From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 2DCE62E8A for ; Wed, 5 Apr 2017 06:51:16 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 04 Apr 2017 21:51:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,277,1486454400"; d="scan'208";a="952009184" Received: from jeffguo-s2600wt2.sh.intel.com ([10.239.129.150]) by orsmga003.jf.intel.com with ESMTP; 04 Apr 2017 21:51:14 -0700 From: Jeff Guo To: helin.zhang@intel.com, jingjing.wu@intel.com Cc: dev@dpdk.org, jia.guo@intel.com Date: Wed, 5 Apr 2017 12:48:42 +0800 Message-Id: <1491367723-53124-1-git-send-email-jia.guo@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [dpdk-dev 1/2] lib: fix ipv6 tunnel csum issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Apr 2017 04:51:17 -0000 When packet is flag of "PKT_TX_OUTER_IPV6", it also need to be considered to be tunnel case, in order to calculate the correct csum value. Fixes: 2b76648872c9 ("net/e1000: add Tx preparation") Signed-off-by: Jeff Guo --- lib/librte_net/rte_net.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_net/rte_net.h b/lib/librte_net/rte_net.h index 548eaed..79c764a 100644 --- a/lib/librte_net/rte_net.h +++ b/lib/librte_net/rte_net.h @@ -120,7 +120,8 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags) struct udp_hdr *udp_hdr; uint64_t inner_l3_offset = m->l2_len; - if (ol_flags & PKT_TX_OUTER_IP_CKSUM) + if ((ol_flags & PKT_TX_OUTER_IP_CKSUM) || + (ol_flags & PKT_TX_OUTER_IPV6)) inner_l3_offset += m->outer_l2_len + m->outer_l3_len; if ((ol_flags & PKT_TX_UDP_CKSUM) == PKT_TX_UDP_CKSUM) { -- 2.7.4