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 C79272935 for ; Wed, 6 Apr 2016 13:24:02 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP; 06 Apr 2016 04:23:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,447,1455004800"; d="scan'208";a="926596918" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by orsmga001.jf.intel.com with ESMTP; 06 Apr 2016 04:24:00 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.35]) by IRSMSX151.ger.corp.intel.com ([169.254.4.72]) with mapi id 14.03.0248.002; Wed, 6 Apr 2016 12:23:57 +0100 From: "Ananyev, Konstantin" To: "Tao, Zhe" , "dev@dpdk.org" CC: "Tao, Zhe" , "Wu, Jingjing" Thread-Topic: [dpdk-dev] [PATCH v4] i40e: fix TSO issue for tx function Thread-Index: AQHRj94W+x4+M1UFekuLGUxYK9i0U598zY+A Date: Wed, 6 Apr 2016 11:23:57 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725836B2EAD0@irsmsx105.ger.corp.intel.com> References: <1459426558-23423-1-git-send-email-zhe.tao@intel.com> <1459930592-8196-1-git-send-email-zhe.tao@intel.com> In-Reply-To: <1459930592-8196-1-git-send-email-zhe.tao@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTRmYzMyNjgtMWU2Yi00ZWI3LWJmM2EtYzQzN2E3ZDg5YTFmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlBYMERySXNmNk9QMXFIZ0FlUk9ZektvVFBReWxoVEMyaGpMOXFSQ3Z2RGc9In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4] 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: Wed, 06 Apr 2016 11:24:03 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhe Tao > Sent: Wednesday, April 06, 2016 9:17 AM > To: dev@dpdk.org > Cc: Tao, Zhe; Wu, Jingjing > Subject: [dpdk-dev] [PATCH v4] i40e: fix TSO issue for tx function >=20 > Issue: >=20 > when using the following CLI in testpmd to enable ipv6 TSO feature > (set --txqflags=3D0 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 >=20 > 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 descript= or. > But PMD will not call i40e_txd_enable_checksum if only the TSO offload fl= ag 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 w= ill 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 whe= n TSO > flag is set. >=20 > Fixes: e3f0151f (i40e: enable Tx checksum only for offloaded packets) >=20 > Signed-off-by: Zhe Tao >=20 > --- > 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 > v4: moved the history under the commit log > --- > drivers/net/i40e/i40e_rxtx.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c > index 59909f3..4d35d83 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) >=20 > static uint16_t i40e_xmit_pkts_simple(void *tx_queue, > -- Acked-by: Konstantin Ananyev > 2.1.4