From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D7EEA6CA1 for ; Thu, 31 Mar 2016 14:18:47 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 31 Mar 2016 05:18:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,422,1455004800"; d="scan'208";a="922553194" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.107]) by orsmga001.jf.intel.com with SMTP; 31 Mar 2016 05:18:44 -0700 Received: by (sSMTP sendmail emulation); Thu, 31 Mar 2016 13:18:44 +0025 Date: Thu, 31 Mar 2016 13:18:44 +0100 From: Bruce Richardson To: Zhe Tao Cc: dev@dpdk.org, jingjing.wu@intel.com Message-ID: <20160331121844.GB27312@bricha3-MOBL3> References: <1458703670-19898-1-git-send-email-zhe.tao@intel.com> <1459426558-23423-1-git-send-email-zhe.tao@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1459426558-23423-1-git-send-email-zhe.tao@intel.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v3] i40e: fix 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: Thu, 31 Mar 2016 12:18:48 -0000 On Thu, Mar 31, 2016 at 08:15:58PM +0800, Zhe Tao wrote: > Issue: > > when using the following CLI in testpmd to enable ipv6 TSO feature > (set --txqflags=0 in the testpmd command) > 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 what 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 does 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, we use > i40e_txd_enable_checksum to generate the related fields for data descriptor. > But PMD will not call i40e_txd_enable_checksum if only the TSO offload flag is > set. The reason why ipv4 works fine for TSO in testpmd csum mode is csum engine > will set the ip csum flag when the packet is ipv4 and TSO is enabled but > will not set the flag for ipv6 and this flag will cause the > i40e_txd_enable_checksum to be invoked. For both the cases the TSO flag will be > set, so we need to use TSO flag to trigger the i40e_txd_enable_checksum. > The right logic here is we enable csum offload for both ipv4 and ipv6 when TSO > flag is set. > > Fixes: e3f0151f (i40e: enable Tx checksum only for offloaded packets) Missing sign-off in this version. > --- > drivers/net/i40e/i40e_rxtx.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c > index 81cde6c..6e3fd25 100644 > --- a/drivers/net/i40e/i40e_rxtx.c > +++ b/drivers/net/i40e/i40e_rxtx.c > @@ -76,6 +76,7 @@ > #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, > -- > v2: changed condition check for ipv6 TSO checksum offload > use a more clear check method which include both ipv4 & ipv6 TSO > v3: edited the commit log and title because this problem exists for both > ipv4 and ipv6 > 2.1.4 > This version history is clearer when placed immediately below the commit description. You also need to use a 3-character cut-line, rather than 2-char, in that case. /Bruce