From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Qiu Subject: [PATCH 2/2] examples/tep_term: Fix packet len for multi-seg mbuf Date: Tue, 18 Oct 2016 13:49:07 +0800 Message-ID: <1476769747-23289-2-git-send-email-qiudayu@chinac.com> References: <1476769747-23289-1-git-send-email-qiudayu@chinac.com> Cc: jianfeng.tan@intel.com, Michael Qiu To: dev@dpdk.org Return-path: Received: from mail-pa0-f67.google.com (mail-pa0-f67.google.com [209.85.220.67]) by dpdk.org (Postfix) with ESMTP id 4E6622C29 for ; Tue, 18 Oct 2016 07:50:51 +0200 (CEST) Received: by mail-pa0-f67.google.com with SMTP id hh10so10020566pac.0 for ; Mon, 17 Oct 2016 22:50:51 -0700 (PDT) In-Reply-To: <1476769747-23289-1-git-send-email-qiudayu@chinac.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- examples/tep_termination/vxlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tep_termination/vxlan.c b/examples/tep_termination/vxlan.c index b57f867..9142c8d 100644 --- a/examples/tep_termination/vxlan.c +++ b/examples/tep_termination/vxlan.c @@ -218,7 +218,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 */ -- 1.8.3.1