From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 224F08073 for ; Mon, 1 Dec 2014 14:08:31 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 01 Dec 2014 05:00:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,493,1413270000"; d="scan'208";a="630750633" Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105]) by fmsmga001.fm.intel.com with ESMTP; 01 Dec 2014 05:07:58 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX107.gar.corp.intel.com (10.221.44.105) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 1 Dec 2014 21:07:57 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.86]) with mapi id 14.03.0195.001; Mon, 1 Dec 2014 21:07:56 +0800 From: "Liu, Jijiang" To: Olivier MATZ , "Ananyev, Konstantin" Thread-Topic: [dpdk-dev] [PATCH 1/3] mbuf:add two TX offload flags and change three fields Thread-Index: AQHQCij3gT8zSau+ukaSqjkBc7C0OJx0gSYg//+JDYCAACL2gIABKWIAgANpAQCAAUd7UP//93WAgAAjWwCAAAhTgIAAj0wg Date: Mon, 1 Dec 2014 13:07:55 +0000 Message-ID: <1ED644BD7E0A5F4091CF203DAFB8E4CC01D9F7B3@SHSMSX101.ccr.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> In-Reply-To: <547C5EE7.1060100@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] 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 13:08:33 -0000 > -----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 cha= nge > three fields >=20 > Hi Konstantin, >=20 > 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 w= ill 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 > I would agree if we had a m->outer_l4_len. Maybe we should add it to be > coherent with lX_len fields? >=20 > I think that to process the inner IP checksum, we should be able to use t= hese 2 > notations: >=20 > 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) >=20 > 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) >=20 > 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 is = a part of VXLAN tunneling header as the UDP destination port indicate if a = packet is VXLAN packet. > Maybe adding outer_l4_len makes more sense. >=20 > Regards, > Olivier