struct rte_ether_addr addr;
/* Swap dest and src mac addresses. */
- rte_ether_addr_copy(ð_hdr->d_addr, &addr);
- rte_ether_addr_copy(ð_hdr->s_addr, ð_hdr->d_addr);
- rte_ether_addr_copy(&addr, ð_hdr->s_addr);
+ rte_ether_addr_copy(ð_hdr->dst_addr, &addr);
+ rte_ether_addr_copy(ð_hdr->src_addr, ð_hdr->dst_addr);
+ rte_ether_addr_copy(&addr, ð_hdr->src_addr);
}
static inline void
if (proto == RTE_BE16(RTE_ETHER_TYPE_IPV4)) {
swap_ipv4(h.ipv4);
next_proto = h.ipv4->next_proto_id;
- mb->l3_len = (h.ipv4->version_ihl & 0x0f) * 4;
+ mb->l3_len = rte_ipv4_hdr_len(h.ipv4);
h.byte += mb->l3_len;
} else if (proto == RTE_BE16(RTE_ETHER_TYPE_IPV6)) {
swap_ipv6(h.ipv6);