From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id D96152BF3 for ; Wed, 30 Aug 2017 15:28:01 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP; 30 Aug 2017 06:27:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,448,1498546800"; d="scan'208";a="129915815" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by orsmga002.jf.intel.com with ESMTP; 30 Aug 2017 06:27:53 -0700 Received: from irsmsx156.ger.corp.intel.com (10.108.20.68) by IRSMSX106.ger.corp.intel.com (163.33.3.31) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 30 Aug 2017 14:27:52 +0100 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.22]) by IRSMSX156.ger.corp.intel.com ([169.254.3.130]) with mapi id 14.03.0319.002; Wed, 30 Aug 2017 14:27:52 +0100 From: "Kavanagh, Mark B" To: "Ananyev, Konstantin" , "Hu, Jiayu" CC: "dev@dpdk.org" , "Tan, Jianfeng" Thread-Topic: [PATCH 2/5] gso/lib: add TCP/IPv4 GSO support Thread-Index: AQHTHOM2JlGz7S1xvEqkdDT8yCb80aKcFteAgAAVmACAAHucoP//9ROAgAAFnoCAAElXwA== Date: Wed, 30 Aug 2017 13:27:51 +0000 Message-ID: References: <1503584144-63181-1-git-send-email-jiayu.hu@intel.com> <1503584144-63181-3-git-send-email-jiayu.hu@intel.com> <2601191342CEEE43887BDE71AB9772584F23E097@IRSMSX103.ger.corp.intel.com> <20170830025550.GA113170@dpdk15.sh.intel.com> <2601191342CEEE43887BDE71AB9772584F23E197@IRSMSX103.ger.corp.intel.com> <2601191342CEEE43887BDE71AB9772584F23E1D4@IRSMSX103.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB9772584F23E1D4@IRSMSX103.ger.corp.intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2YyMDNmM2UtOGIzMS00NjdlLTk3OWUtNGFjNWZlYjEwYzZjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlRQWnVvek8waFpWYUhEZTNyak52c0QwanJuMEZ0SjVpM0xQUmRpNjdUc289In0= dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action 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 2/5] gso/lib: add TCP/IPv4 GSO support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Aug 2017 13:28:02 -0000 >From: Ananyev, Konstantin >Sent: Wednesday, August 30, 2017 10:59 AM >To: Ananyev, Konstantin ; Kavanagh, Mark B >; Hu, Jiayu >Cc: dev@dpdk.org; Tan, Jianfeng >Subject: RE: [PATCH 2/5] gso/lib: add TCP/IPv4 GSO support > > > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ananyev, Konstantin >> Sent: Wednesday, August 30, 2017 10:39 AM >> To: Kavanagh, Mark B ; Hu, Jiayu > >> Cc: dev@dpdk.org; Tan, Jianfeng >> Subject: Re: [dpdk-dev] [PATCH 2/5] gso/lib: add TCP/IPv4 GSO support >> >> Hi Mark, >> >> > >> > + >> > >> > +void >> > >> > +gso_parse_packet(struct rte_mbuf *pkt) >> > >> >> > >> There is a function rte_net_get_ptype() that supposed to provide >similar >> > >functionality. >> > >> So we probably don't need to create a new SW parse function here, >instead >> > >would be better >> > >> to reuse (and update if needed) an existing one. >> > >> Again user already might have l2/l3/l4.../_len and packet_type setu= ped. >> > >> So better to keep SW packet parsing out of scope of that library. >> > > >> > >Hmm, I know we have discussed this design choice in the GRO library, = and >I >> > >also think it's >> > >better to reuse these values. >> > > >> > >But from the perspective of OVS, it may add extra overhead, since OVS >doesn't >> > >parse every >> > >packet originally. Maybe @Mark can give us more inputs from the view = of >OVS. >> > >> > Hi Jiayu, Konstantin >> > >> > For GSO, the application needs to know: >> > - the packet type (as it only currently supports TCP/IPv4, VxLAN, GRE >packets) >> > - the l2/3/4_lens, etc. (in order to replicate the original packet's >headers across outgoing segments) >> > >> > For this, we can use the rte_net_get_ptype function, as per Konstantin= 's >suggestion, as it provides both - thanks Konstantin! >> > >> > WRT the extra overhead in OvS: TSO is the defacto standard, and GSO is >provided purely as a fallback option. As such, and since the >> > additional packet parsing is a necessity in order to facilitate GSO, t= he >additional overhead is IMO acceptable. >> >> As I remember, for TSO in DPDK user still have to provide l2/l3/l4_len a= nd >mss information to the PMD. Yes, that's correct.=20 >> So unless user knows these value straightway (user creates a packet hims= elf) >some packet processing will be unavailable anyway. That's correct also. Currently, packets that originate in a VM, and which h= ave been marked for TSO, have the l2_len, etc. fields populated by the 'par= se_ethernet' function, called as part of the call stack of the rte_vhost_de= queue_burst function, so that particular overhead is already implicit in th= e TSO case. >> Konstantin > >s/unavailable/unavoidable/ >sorry for bad typing. >Konstantin > >> > >> > Thanks, >> > Mark >> >