X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2F5tswap.c;h=629d3e0d3176fcc6560ad4fcf294212d7928b630;hb=a2dfcd1ff609f5a4fd3b65774618a35c5c9f73c6;hp=3cf1692eaba8d918d915fbe1b76385a693077264;hpb=4016f0bc45c66aadfee67ab28a90599b922978cd;p=dpdk.git diff --git a/app/test-pmd/5tswap.c b/app/test-pmd/5tswap.c index 3cf1692eab..629d3e0d31 100644 --- a/app/test-pmd/5tswap.c +++ b/app/test-pmd/5tswap.c @@ -27,9 +27,9 @@ swap_mac(struct rte_ether_hdr *eth_hdr) 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 @@ -142,7 +142,7 @@ pkt_burst_5tuple_swap(struct fwd_stream *fs) 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);