From: Michael Qiu Date: Tue, 18 Oct 2016 05:49:07 +0000 (+0800) Subject: examples/tep_term: fix packet length with multi-segments X-Git-Tag: spdx-start~5504 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8e22aae5cb1f183a8a2b819fd4e07f6f31c5964a;p=dpdk.git examples/tep_term: fix packet length with multi-segments For multi-seg mbuf, ip->total_length should be pkt_len subtract ether len. Fixes: 4abe471ed6fc ("examples/tep_term: implement VXLAN processing") Signed-off-by: Michael Qiu Acked-by: Jianfeng Tan --- diff --git a/examples/tep_termination/vxlan.c b/examples/tep_termination/vxlan.c index 109e93aa83..9f0e8362fa 100644 --- a/examples/tep_termination/vxlan.c +++ b/examples/tep_termination/vxlan.c @@ -221,7 +221,7 @@ encapsulation(struct rte_mbuf *m, uint8_t queue_id) /* copy in IP header */ ip = rte_memcpy(ip, &app_ip_hdr[vport_id], sizeof(struct ipv4_hdr)); - ip->total_length = rte_cpu_to_be_16(m->data_len + ip->total_length = rte_cpu_to_be_16(m->pkt_len - sizeof(struct ether_hdr)); /* outer IP checksum */