/*
* Default payload in bytes for the IPv6 packet.
*/
-#define IPV4_DEFAULT_PAYLOAD (IPV4_MTU_DEFAULT - sizeof(struct ipv4_hdr))
-#define IPV6_DEFAULT_PAYLOAD (IPV6_MTU_DEFAULT - sizeof(struct ipv6_hdr))
+#define IPV4_DEFAULT_PAYLOAD (IPV4_MTU_DEFAULT - sizeof(struct rte_ipv4_hdr))
+#define IPV6_DEFAULT_PAYLOAD (IPV6_MTU_DEFAULT - sizeof(struct rte_ipv6_hdr))
/*
* Max number of fragments per packet expected - defined by config file.
};
struct l3fwd_ipv4_route l3fwd_ipv4_route_array[] = {
- {IPv4(100,10,0,0), 16, 0},
- {IPv4(100,20,0,0), 16, 1},
- {IPv4(100,30,0,0), 16, 2},
- {IPv4(100,40,0,0), 16, 3},
- {IPv4(100,50,0,0), 16, 4},
- {IPv4(100,60,0,0), 16, 5},
- {IPv4(100,70,0,0), 16, 6},
- {IPv4(100,80,0,0), 16, 7},
+ {RTE_IPv4(100,10,0,0), 16, 0},
+ {RTE_IPv4(100,20,0,0), 16, 1},
+ {RTE_IPv4(100,30,0,0), 16, 2},
+ {RTE_IPv4(100,40,0,0), 16, 3},
+ {RTE_IPv4(100,50,0,0), 16, 4},
+ {RTE_IPv4(100,60,0,0), 16, 5},
+ {RTE_IPv4(100,70,0,0), 16, 6},
+ {RTE_IPv4(100,80,0,0), 16, 7},
};
/*
/* if this is an IPv4 packet */
if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) {
- struct ipv4_hdr *ip_hdr;
+ struct rte_ipv4_hdr *ip_hdr;
uint32_t ip_dst;
/* Read the lookup key (i.e. ip_dst) from the input packet */
- ip_hdr = rte_pktmbuf_mtod(m, struct ipv4_hdr *);
+ ip_hdr = rte_pktmbuf_mtod(m, struct rte_ipv4_hdr *);
ip_dst = rte_be_to_cpu_32(ip_hdr->dst_addr);
/* Find destination port */
}
} else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) {
/* if this is an IPv6 packet */
- struct ipv6_hdr *ip_hdr;
+ struct rte_ipv6_hdr *ip_hdr;
ipv6 = 1;
/* Read the lookup key (i.e. ip_dst) from the input packet */
- ip_hdr = rte_pktmbuf_mtod(m, struct ipv6_hdr *);
+ ip_hdr = rte_pktmbuf_mtod(m, struct rte_ipv6_hdr *);
/* Find destination port */
if (rte_lpm6_lookup(rxq->lpm6, ip_hdr->dst_addr,