From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id DEC00803C for ; Mon, 1 Dec 2014 15:32:02 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 01 Dec 2014 06:29:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,494,1413270000"; d="scan'208";a="616668760" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by orsmga001.jf.intel.com with ESMTP; 01 Dec 2014 06:31:47 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.144]) by IRSMSX154.ger.corp.intel.com ([169.254.12.18]) with mapi id 14.03.0195.001; Mon, 1 Dec 2014 14:31:46 +0000 From: "Ananyev, Konstantin" To: "Liu, Jijiang" , Olivier MATZ Thread-Topic: [dpdk-dev] [PATCH 1/3] mbuf:add two TX offload flags and change three fields Thread-Index: AQHQCikb8nVQX/4wQEWUH1iPbQ9du5x0gSyAgAABBFCAAC/e0IABKpkAgANkFaCAAMiKAIAAe1KAgAAh3XCAAAnRgIAACwuAgAAS1IA= Date: Mon, 1 Dec 2014 14:31:45 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258213BBBBE@IRSMSX105.ger.corp.intel.com> References: <1417076319-629-1-git-send-email-jijiang.liu@intel.com> <1417076319-629-2-git-send-email-jijiang.liu@intel.com> <5476F626.2020708@6wind.com> <1ED644BD7E0A5F4091CF203DAFB8E4CC01D9EEA0@SHSMSX101.ccr.corp.intel.com> <2601191342CEEE43887BDE71AB977258213BADB8@IRSMSX105.ger.corp.intel.com> <2601191342CEEE43887BDE71AB977258213BAE90@IRSMSX105.ger.corp.intel.com> <54785264.1020208@6wind.com> <2601191342CEEE43887BDE71AB977258213BB795@IRSMSX105.ger.corp.intel.com> <1ED644BD7E0A5F4091CF203DAFB8E4CC01D9F58E@SHSMSX101.ccr.corp.intel.com> <547C3A43.8020009@6wind.com> <2601191342CEEE43887BDE71AB977258213BBB21@IRSMSX105.ger.corp.intel.com> <547C5EE7.1060100@6wind.com> <1ED644BD7E0A5F4091CF203DAFB8E4CC01D9F7B3@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <1ED644BD7E0A5F4091CF203DAFB8E4CC01D9F7B3@SHSMSX101.ccr.corp.intel.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" Subject: Re: [dpdk-dev] [PATCH 1/3] mbuf:add two TX offload flags and change three fields 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: Mon, 01 Dec 2014 14:32:05 -0000 Hi lads, > -----Original Message----- > From: Liu, Jijiang > Sent: Monday, December 01, 2014 1:08 PM > To: Olivier MATZ; Ananyev, Konstantin > Cc: dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH 1/3] mbuf:add two TX offload flags and cha= nge three fields >=20 >=20 >=20 > > -----Original Message----- > > From: Olivier MATZ [mailto:olivier.matz@6wind.com] > > Sent: Monday, December 1, 2014 8:28 PM > > To: Ananyev, Konstantin; Liu, Jijiang > > Cc: dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH 1/3] mbuf:add two TX offload flags and c= hange > > three fields > > > > Hi Konstantin, > > > > On 12/01/2014 12:58 PM, Ananyev, Konstantin wrote: > > >> Ether/IP/UDP/vxlan/Ether/IP/UDP/xxx > > >> m->outer_l2_len =3D sizeof(ether) > > >> m->outer_l3_len =3D sizeof(ip) > > >> m->l2_len =3D sizeof(udp) + sizeof(vxlan) + sizeof(ether) > > > > > > I think it should be: > > > m->l2_len =3D sizeof(vxlan) + sizeof(ether) > > > > > > We don't need to add sizeof(udp) as we already say to the HW that I t= will be > > UDP TUNNELING vi the ol_flag: PKT_TX_UDP_TUNNEL_PKT. > > > > > >> m->l3_len =3D sizeof(ip) > > >> m->l4_len =3D sizeof(udp) > > > > I would agree if we had a m->outer_l4_len. Maybe we should add it to be > > coherent with lX_len fields? > > > > I think that to process the inner IP checksum, we should be able to use= these 2 > > notations: > > > > Ether/IP/GRE/IP/UDP/xxx > > m->flags =3D OUTER_IP_CKSUM > > m->outer_l2_len =3D sizeof(ether) > > m->outer_l3_len =3D sizeof(ip) > > m->l2_len =3D sizeof(gre) > > m->l3_len =3D sizeof(ip) > > m->l4_len =3D sizeof(udp) > > > > Ether/IP/GRE/IP/UDP/xxx > > m->flags =3D IP_CKSUM > > /* sum of all outer_lX_len and l2_len from above: */ > > m->l2_len =3D sizeof(ether) + sizeof(ip) + sizeof(gre) > > m->l3_len =3D sizeof(ip) > > m->l4_len =3D sizeof(udp) > > > > So, in case of vxlan, I suggest that either we include the size of UDP = in l2_len, or > > we add a outer_l4_len. What do you think? > I agree to include the size of UDP in l2_len, for VXLAN, the UDP header i= s a part of VXLAN tunnelling header as the UDP destination > port indicate if a packet is VXLAN packet. Actually it is my bad. While looking at current implementation, I didn't realise that: ETHER_VXLAN= _HLEN =3D=3D (sizeof(struct udp_hdr) + sizeof(struct vxlan_hdr)). So yes you are right for VXLAN packet it should be: m->l2_len =3D sizeof(udp) + sizeof(vxlan) + sizeof(ether); Sorry for confusing everyone. Konstantin > > Maybe adding outer_l4_len makes more sense. >=20 > > > > Regards, > > Olivier