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 07C01805E for ; Mon, 1 Dec 2014 12:58:41 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 01 Dec 2014 03:58:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,493,1413270000"; d="scan'208";a="640650488" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by fmsmga002.fm.intel.com with ESMTP; 01 Dec 2014 03:58:37 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.144]) by IRSMSX153.ger.corp.intel.com ([163.33.192.75]) with mapi id 14.03.0195.001; Mon, 1 Dec 2014 11:58:37 +0000 From: "Ananyev, Konstantin" To: Olivier MATZ , "Liu, Jijiang" Thread-Topic: [dpdk-dev] [PATCH 1/3] mbuf:add two TX offload flags and change three fields Thread-Index: AQHQCikb8nVQX/4wQEWUH1iPbQ9du5x0gSyAgAABBFCAAC/e0IABKpkAgANkFaCAAMiKAIAAe1KAgAAh3XA= Date: Mon, 1 Dec 2014 11:58:36 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258213BBB21@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> In-Reply-To: <547C3A43.8020009@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.180] 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 11:58:42 -0000 > -----Original Message----- > From: Olivier MATZ [mailto:olivier.matz@6wind.com] > Sent: Monday, December 01, 2014 9:52 AM > To: Liu, Jijiang; 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 > Hi Jijiang, >=20 > On 12/01/2014 03:30 AM, Liu, Jijiang wrote: > >> After another thought, I think that the way you proposed is a better o= ne. > >> I gives us more flexibility: > >> let's say for now we'll keep both l2_len and outer_l2_len as 7 bit fie= lds, and upper > >> layer would have to: > >> mb->l2_len =3D eth_hdr_in + vxlan_hdr; > > > > A question, how to fill the mb->l2_len for IP in IP, IP in GRE tunneli= ng packet that is no inner L2 header? > > What is the rule? > > Or you think it should be mb->l2_len =3D 0 + l4_tun_len; ?? I think it should be: l2_len =3D 0 + l4_tun_len; >>From your patch: l4_tunnel_len =3D l4_tun_len + l2_len; >=20 > We could have the following rule: > - the l2_len starts after the end of outer_l2_len + outer_l3_len (if > they are not 0) I think it should start after the outer_l4_hdr. I.e. right now we don't include udp header length into it. > - l2_len is the length of all headers up to the first ip or ipv6 > header Yes, same thought here. >=20 > Examples: >=20 > Ether/IP/UDP/xxx > m->outer_l2_len =3D 0 > m->outer_l3_len =3D 0 > m->l2_len =3D sizeof(ether) > m->l3_len =3D sizeof(ip) > m->l4_len =3D sizeof(udp) >=20 > Ether/IP/IP/UDP/xxx > m->outer_l2_len =3D sizeof(ether) > m->outer_l3_len =3D sizeof(ip) > m->l2_len =3D 0 > m->l3_len =3D sizeof(ip) > m->l4_len =3D sizeof(udp) >=20 > Ether/IP/GRE/IP/UDP/xxx > 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) >=20 > 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) >=20 > Regards, > Olivier