From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <konstantin.ananyev@intel.com>
Received: from mga02.intel.com (mga02.intel.com [134.134.136.20])
 by dpdk.org (Postfix) with ESMTP id 5FAF55A75
 for <dev@dpdk.org>; Mon, 26 Jan 2015 05:13:40 +0100 (CET)
Received: from fmsmga003.fm.intel.com ([10.253.24.29])
 by orsmga101.jf.intel.com with ESMTP; 25 Jan 2015 20:13:39 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="445044862"
Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59])
 by FMSMGA003.fm.intel.com with ESMTP; 25 Jan 2015 20:00:01 -0800
Received: from irsmsx105.ger.corp.intel.com ([169.254.7.81]) by
 IRSMSX151.ger.corp.intel.com ([169.254.4.141]) with mapi id 14.03.0195.001;
 Mon, 26 Jan 2015 04:13:36 +0000
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: Olivier MATZ <olivier.matz@6wind.com>, "Liu, Jijiang"
 <jijiang.liu@intel.com>
Thread-Topic: [dpdk-dev] [PATCH v3 0/3] enhance TX checksum command and csum
 forwarding engine
Thread-Index: AQHQFSvOf5ZHcwOIQ0S6LPFf4KIhoZyLUqAAgADVrYCAJ+m7AIAAhGKAgAAcY4CAAAaCgIABXQMAgAAfBJCAAZMJAIAEQKUAgACGkwCAAQFCAIAAcvAAgAEemACAAkDH8IAB1gMAgARiT1CAACVrgIAAHEZAgAFUrACAADW5sIAAKFUAgACV94CAAMyvAIAHCkRw
Date: Mon, 26 Jan 2015 04:13:35 +0000
Message-ID: <2601191342CEEE43887BDE71AB977258213DF71B@irsmsx105.ger.corp.intel.com>
References: <1418173403-30202-1-git-send-email-jijiang.liu@intel.com>
 <1ED644BD7E0A5F4091CF203DAFB8E4CC01DA7CC5@SHSMSX101.ccr.corp.intel.com>
 <2601191342CEEE43887BDE71AB977258213D3897@irsmsx105.ger.corp.intel.com>
 <54AFB13E.2080200@6wind.com>
 <1ED644BD7E0A5F4091CF203DAFB8E4CC01DA85A1@SHSMSX101.ccr.corp.intel.com>
 <54B3B35A.5030803@6wind.com>
 <1ED644BD7E0A5F4091CF203DAFB8E4CC01DA8E36@SHSMSX101.ccr.corp.intel.com>
 <54B4EB92.40209@6wind.com>
 <1ED644BD7E0A5F4091CF203DAFB8E4CC01DB0789@SHSMSX101.ccr.corp.intel.com>
 <2601191342CEEE43887BDE71AB977258213D4FCF@irsmsx105.ger.corp.intel.com>
 <54B94A18.5030700@6wind.com>
 <2601191342CEEE43887BDE71AB977258213DCD25@irsmsx105.ger.corp.intel.com>
 <54BD16F1.6050409@6wind.com>
 <2601191342CEEE43887BDE71AB977258213DDF46@irsmsx105.ger.corp.intel.com>
 <54BE4C70.7050406@6wind.com>
 <2601191342CEEE43887BDE71AB977258213DE5FB@irsmsx105.ger.corp.intel.com>
 <54BE9B56.7050108@6wind.com>
 <1ED644BD7E0A5F4091CF203DAFB8E4CC01DB55DB@SHSMSX101.ccr.corp.intel.com>
 <54BFC4D6.2010903@6wind.com>
In-Reply-To: <54BFC4D6.2010903@6wind.com>
Accept-Language: en-IE, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [163.33.239.181]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v3 0/3] enhance TX checksum command and csum
 forwarding engine
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: Mon, 26 Jan 2015 04:13:41 -0000

Hi lads,

> -----Original Message-----
> From: Olivier MATZ [mailto:olivier.matz@6wind.com]
> Sent: Wednesday, January 21, 2015 3:25 PM
> To: Liu, Jijiang; Ananyev, Konstantin
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3 0/3] enhance TX checksum command and cs=
um forwarding engine
>=20
> Hi,
>=20
> On 01/21/2015 04:12 AM, Liu, Jijiang wrote:
> >>>>> Ok, and why it should be our problem?
> >>>>> We have a lot of things done in a different manner then
> >>>>> linux/freebsd kernel drivers, Why now it became a problem?
> >>>>
> >>>> If linux doesn't need an equivalent flag for doing the same thing, i=
t
> >>>> probably means we don't need it either.
> >>>
> >>> Probably yes .... Or probably not.
> >>> Why do we need to guess what was the intention of guys who wrote that
> >> part of linux driver?
> >>
> >> Because the dpdk looks very similar to that part of linux driver.
> >
> > A  guy from Intel  who have already confirmed that the NVGRE is not sup=
ported yet in Linux kernel.
> >
> > He said "So far as I know it is not yet supported and I have no informa=
tion on when it will be."
>=20
> I added the support of Ether over GRE, IP over GRE and IP over IP
> tunnels in csumonly to do the test. I ask the csum forward engine
> to calculate inner IP+TCP checksums, and outer IP (case 6 in [1]).
> Here are the results:
>=20
> 1/ When I use I40E_TXD_CTX_UDP_TUNNELING:
> - vxlan: all checksums ok
> - eth over gre: all checksums ok
> - ip over gre: not transmitted by hw
> - ip over ip: all checksums wrong (set to 0 by hw)
>=20
> 2/ When I use I40E_TXD_CTX_GRE_TUNNELING:
> - vxlan: checksums ok
> - eth over gre: all checksums ok
> - ip over gre: all checksums ok
> - ip over ip: all checksums wrong (set to 0 by hw)
>=20
> 3/ When I use 00b:
> - vxlan: all checksums ok
> - eth over gre: all checksums ok
> - ip over gre: all checksums ok
> - ip over ip: checksums wrong (set to 0 by hw)
>=20
> All the ip over ip tests do not work yet for an unknown reason.
> There is maybe something wrong in my app or in the driver
> (although the registers looks consistent with the datasheet).
>=20
> I think we could use 3/ for all tunnels, because the ipip case
> is supposed to work according to the datasheet, and all other cases
> work too.
>=20
> It would allow to remove the UDP_TUNNELING flag from mbuf API.
>=20
> I will send a RFC patch that provides the API change and this new
> feature in csum forward engine, with full tests on ixgbe and i40e
> and explanations for all changes.
>=20
> Regards,
> Olivier
>=20
> [1] http://dpdk.org/ml/archives/dev/2015-January/011127.html

I tried to repeat Olivier test-cases on my box.
Though, I didn't use test-pmd cusmonly and  i40ePMD logic, but filled TCD a=
nd TDD mostly from hardcoded values.
That's  what I got:

4 input packets:
a) ETHER/IPv4/UDP/VXLAN/ETHER/IPV4/TCP
b) ETHER/IPv4/GRE/ETHER/IPV4/TCP
c) ETHER/IPv4/GRE/IPV4/TCP
d) ETHER/IPv4/IPV4/TCP

1/ L4TUNT=3D=3D1(I40E_TXD_CTX_UDP_TUNNELING):
a),b): all checksums ok
c),d): not transmitted by HW.

2/ L4TUNT=3D=3D2(I40E_TXD_CTX_GRE_TUNNELING):
a) b),c): all checksums ok
d): not transmitted by HW.

3/ L4TUNT=3D=3D0(UNKNOWN):
a),b),c),d): all checksums ok

So yes, it seems that L4TUNT=3D=3D0 works perfectly ok for all cases, as lo=
ng as L4TUNLEN and other TCD values are setup properly.
Which makes me think, that  probably we can do what you suggested: just use=
 L4TUNT=3D0 for all cases.=20
Though as Jijiang said, we waiting for confirmation from FVL guys, that the=
re are no hidden implications with that approach.

Another thing - IPIP seems to work ok by HW.
There is something wrong on our (PMD/test-pmd) side.
I think at least we have to remove the following check:
if (!l2_len) {
                PMD_DRV_LOG(DEBUG, "L2 length set to 0");
                return;
        }
in i40e_txd_enable_checksum().

Konstantin