static inline void
print_ether_addr(const char *what, struct rte_ether_addr *eth_addr)
{
- char buf[ETHER_ADDR_FMT_SIZE];
- rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+ char buf[RTE_ETHER_ADDR_FMT_SIZE];
+ rte_ether_format_addr(buf, RTE_ETHER_ADDR_FMT_SIZE, eth_addr);
printf("%s%s", what, buf);
}
if (sw_packet_type & RTE_PTYPE_INNER_L4_MASK)
printf(" - inner_l4_len=%d", hdr_lens.inner_l4_len);
if (is_encapsulation) {
- struct ipv4_hdr *ipv4_hdr;
- struct ipv6_hdr *ipv6_hdr;
- struct udp_hdr *udp_hdr;
+ struct rte_ipv4_hdr *ipv4_hdr;
+ struct rte_ipv6_hdr *ipv6_hdr;
+ struct rte_udp_hdr *udp_hdr;
uint8_t l2_len;
uint8_t l3_len;
uint8_t l4_len;
/* Do not support ipv4 option field */
if (RTE_ETH_IS_IPV4_HDR(packet_type)) {
- l3_len = sizeof(struct ipv4_hdr);
+ l3_len = sizeof(struct rte_ipv4_hdr);
ipv4_hdr = rte_pktmbuf_mtod_offset(mb,
- struct ipv4_hdr *,
+ struct rte_ipv4_hdr *,
l2_len);
l4_proto = ipv4_hdr->next_proto_id;
} else {
- l3_len = sizeof(struct ipv6_hdr);
+ l3_len = sizeof(struct rte_ipv6_hdr);
ipv6_hdr = rte_pktmbuf_mtod_offset(mb,
- struct ipv6_hdr *,
+ struct rte_ipv6_hdr *,
l2_len);
l4_proto = ipv6_hdr->proto;
}
if (l4_proto == IPPROTO_UDP) {
udp_hdr = rte_pktmbuf_mtod_offset(mb,
- struct udp_hdr *,
+ struct rte_udp_hdr *,
l2_len + l3_len);
- l4_len = sizeof(struct udp_hdr);
+ l4_len = sizeof(struct rte_udp_hdr);
vxlan_hdr = rte_pktmbuf_mtod_offset(mb,
struct rte_vxlan_hdr *,
l2_len + l3_len + l4_len);