From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id B2F362BC8 for ; Wed, 23 Mar 2016 04:27:58 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP; 22 Mar 2016 20:27:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,380,1455004800"; d="scan'208";a="769574899" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga003.jf.intel.com with ESMTP; 22 Mar 2016 20:27:57 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u2N3Rtmf024303; Wed, 23 Mar 2016 11:27:55 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u2N3RqYj019932; Wed, 23 Mar 2016 11:27:54 +0800 Received: (from zhetao@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u2N3RqUt019928; Wed, 23 Mar 2016 11:27:52 +0800 From: Zhe Tao To: dev@dpdk.org Cc: zhe.tao@intel.com, jingjing.wu@intel.com Date: Wed, 23 Mar 2016 11:27:50 +0800 Message-Id: <1458703670-19898-1-git-send-email-zhe.tao@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1458652425-6167-1-git-send-email-zhe.tao@intel.com> References: <1458652425-6167-1-git-send-email-zhe.tao@intel.com> Subject: [dpdk-dev] [PATCH v2] i40e: fix ipv6 TSO issue for tx function 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: Wed, 23 Mar 2016 03:27:59 -0000 Issue: when using the following CLI in testpmd to enable ipv6 TSO feature ============= set verbose 1 csum set ip hw 0 csum set udp hw 0 csum set tcp hw 0 csum set sctp hw 0 csum set outer-ip hw 0 csum parse_tunnel on 0 tso set 800 0 set fwd csum start ============= We will not get we want, the ipv6 packets sent out from IXIA can be received by i40e, but cannot forward to another port. The root cause is when HW doing the TSO offload for packets, it not only depends on the context descriptor to define the MSS and TSO payload size, it also need to know whether this packets is ipv4 or ipv6, ipv4 need the header csum, but ipv6 doesn't need the csum. We need to use the i40e_txd_enable_checksum to set the ipv6 type flag into the data descriptor when the packets are for ipv6 TSO. Fixes: e3f0151f (i40e: enable Tx checksum only for offloaded packets) Signed-off-by: Zhe Tao --- v2: change condition check for ipv6 TSO checksum offload use a more clear check method which include both ipv4 & ipv6 TSO drivers/net/i40e/i40e_rxtx.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 1488f2f..3422ec2 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -73,9 +73,16 @@ #define I40E_TXD_CMD (I40E_TX_DESC_CMD_EOP | I40E_TX_DESC_CMD_RS) +/* need to add the TSO flag to the checksum offload mask + * even the packets like ipv6 doesn't need the checksum for ip header + * but the FW need to know whether this TCP packets is ipv4 or ipv6, + * so add this kind of information in the checksum offload field in the + * normal data descriptor. + */ #define I40E_TX_CKSUM_OFFLOAD_MASK ( \ PKT_TX_IP_CKSUM | \ PKT_TX_L4_MASK | \ + PKT_TX_TCP_SEG | \ PKT_TX_OUTER_IP_CKSUM) static uint16_t i40e_xmit_pkts_simple(void *tx_queue, -- 2.1.4