From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <konstantin.ananyev@intel.com>
Received: from mga14.intel.com (mga14.intel.com [192.55.52.115])
 by dpdk.org (Postfix) with ESMTP id 78DF511D9
 for <dev@dpdk.org>; Wed, 23 Mar 2016 13:46:12 +0100 (CET)
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by fmsmga103.fm.intel.com with ESMTP; 23 Mar 2016 05:46:11 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.24,382,1455004800"; d="scan'208";a="939912954"
Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66])
 by orsmga002.jf.intel.com with ESMTP; 23 Mar 2016 05:46:10 -0700
Received: from irsmsx105.ger.corp.intel.com ([169.254.7.35]) by
 IRSMSX152.ger.corp.intel.com ([169.254.6.34]) with mapi id 14.03.0248.002;
 Wed, 23 Mar 2016 12:46:09 +0000
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: "Tao, Zhe" <zhe.tao@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
CC: "Tao, Zhe" <zhe.tao@intel.com>, "Wu, Jingjing" <jingjing.wu@intel.com>
Thread-Topic: [dpdk-dev] [PATCH v2] i40e: fix ipv6 TSO issue for tx function
Thread-Index: AQHRhLQUa1KnDTAJlUOItGkqourxV59m+i0w
Date: Wed, 23 Mar 2016 12:46:09 +0000
Message-ID: <2601191342CEEE43887BDE71AB97725836B20309@irsmsx105.ger.corp.intel.com>
References: <1458652425-6167-1-git-send-email-zhe.tao@intel.com>
 <1458703670-19898-1-git-send-email-zhe.tao@intel.com>
In-Reply-To: <1458703670-19898-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzViODQ2OTUtZDAyNy00YTFhLTkzMTItMzg1ODNjNmU2Yjc5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InFHODI2dUdyMnpxOWpxdmFvaXRHUzV3bXhaWDZQTFM1TDNNUVZ0bzMwdm89In0=
x-ctpclassification: CTP_IC
x-originating-ip: [163.33.239.181]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [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 <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 23 Mar 2016 12:46:12 -0000



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhe Tao
> Sent: Wednesday, March 23, 2016 3:28 AM
> To: dev@dpdk.org
> Cc: Tao, Zhe; Wu, Jingjing
> Subject: [dpdk-dev] [PATCH v2] i40e: fix ipv6 TSO issue for tx function
>=20
> Issue:
> when using the following CLI in testpmd to enable ipv6 TSO feature
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> 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
>=20
> start
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
> We will not get we want, the ipv6 packets sent out from IXIA can be recei=
ved 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 c=
sum,
> but ipv6 doesn't need the csum. We need to use the i40e_txd_enable_checks=
um to
> set the ipv6 type flag into the data descriptor when the packets are for
> ipv6 TSO.
>=20
> Fixes: e3f0151f (i40e: enable Tx checksum only for offloaded packets)
>=20
> Signed-off-by: Zhe Tao <zhe.tao@intel.com>
> ---
> v2: change condition check for ipv6 TSO checksum offload
>     use a more clear check method which include both ipv4 & ipv6 TSO
>=20
>=20
>  drivers/net/i40e/i40e_rxtx.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>=20
> 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 @@
>=20
>  #define I40E_TXD_CMD (I40E_TX_DESC_CMD_EOP | I40E_TX_DESC_CMD_RS)
>=20
> +/* 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)
>=20
>  static uint16_t i40e_xmit_pkts_simple(void *tx_queue,
> --

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 2.1.4