From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uXxaLm8zszYOZxf1L30lOVlZ/ZlfUqJrqI1Nst1qr4c=; b=bV6HBA8gQIBKMW2//l+IM2gwcHQPP+XIVWIor3TRsY7HYRlSAqjKzRsUv6RVy+vaqC P4wqrcqsZAHgTND/Y4+Ja5yedX87pQrbgYlAioOI89/Yx5VYOsKTbBh3GrbiGEdC7ngJ rQDlWOFG6ULXaEEUjjK6cgqjAH8I2IfehvQZXrqxQ7kpXNwVzZTCM0eX/JlQU7zrHo50 y/+hUdm6bCnPf5QbwGnzOxzEed4qxNLMjApjdHANFuhLy4MW+Ta9T3fHhXYF6z9b4xC+ bL3vQbdDML4I0RwPYKay1gZjc8uii+7octMmWdflYFq3IRRRSDUMSXvM1FlaROwlD99o MgOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uXxaLm8zszYOZxf1L30lOVlZ/ZlfUqJrqI1Nst1qr4c=; b=HV+eljKpob/ZC8OG2XsXWshv5Zb4bkuzqVwET6mMy/voSSwahABGx0/UAMmcmSvMdl QXqXJeNzI4sQ/nXgk5X9uERN5qEOaRjbarQkfW11r/QsP9iXqD9hDgH/yxdRuoMRSlYo eFlJG2D+GfosttrW4n4dGqGwb8QqA/+vk7ZGlGas6PVOBWn5SBXScQZv6F0Ebvw1ktA5 gv+WHzv7R0cHi50dhSA+b9HPLzDPg12X0lV1AfgzM2+dHJfXhS/L3BcXM4H8osL1+eN+ FjzdGV1TswHAAY8Squyx+Yf9BC41gNLtHUe72fFep84pME1f7BnnhUq+KRygzFPr4WOu 0ECA== X-Gm-Message-State: AA6/9Rllfsc8e4525fe9iOcHfh1RFgclnDTXCrYhqQWM3VZEywnoI5DijkaIFWlzNEfiNQ== X-Received: by 10.66.141.39 with SMTP id rl7mr1481959pab.121.1476769850445; Mon, 17 Oct 2016 22:50:50 -0700 (PDT) Received: from localhost.localdomain ([67.229.141.124]) by smtp.gmail.com with ESMTPSA id ym3sm15241201pac.42.2016.10.17.22.50.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Oct 2016 22:50:49 -0700 (PDT) From: Michael Qiu X-Google-Original-From: Michael Qiu To: dev@dpdk.org Cc: jianfeng.tan@intel.com, Michael Qiu Date: Tue, 18 Oct 2016 13:49:07 +0800 Message-Id: <1476769747-23289-2-git-send-email-qiudayu@chinac.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476769747-23289-1-git-send-email-qiudayu@chinac.com> References: <1476769747-23289-1-git-send-email-qiudayu@chinac.com> Subject: [dpdk-dev] [PATCH 2/2] examples/tep_term: Fix packet len for multi-seg mbuf X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2016 05:50:51 -0000 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