From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id B0D8B2C02 for ; Wed, 30 Aug 2017 11:39:12 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Aug 2017 02:39:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,448,1498546800"; d="scan'208";a="143618941" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by orsmga005.jf.intel.com with ESMTP; 30 Aug 2017 02:39:10 -0700 Received: from irsmsx156.ger.corp.intel.com (10.108.20.68) by IRSMSX109.ger.corp.intel.com (163.33.3.23) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 30 Aug 2017 10:39:09 +0100 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.49]) by IRSMSX156.ger.corp.intel.com ([169.254.3.130]) with mapi id 14.03.0319.002; Wed, 30 Aug 2017 10:39:09 +0100 From: "Ananyev, Konstantin" To: "Kavanagh, Mark B" , "Hu, Jiayu" CC: "dev@dpdk.org" , "Tan, Jianfeng" Thread-Topic: [PATCH 2/5] gso/lib: add TCP/IPv4 GSO support Thread-Index: AQHTHOM2ld5YREF+cUG/0JFh8vSiiqKb+V+AgAAzEACAAGzoAIAAE1AQ Date: Wed, 30 Aug 2017 09:39:09 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772584F23E197@IRSMSX103.ger.corp.intel.com> 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> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.180] 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 09:39:13 -0000 Hi Mark, > >> > + > >> > +void > >> > +gso_parse_packet(struct rte_mbuf *pkt) > >> > >> There is a function rte_net_get_ptype() that supposed to provide simil= ar > >functionality. > >> So we probably don't need to create a new SW parse function here, inst= ead > >would be better > >> to reuse (and update if needed) an existing one. > >> Again user already might have l2/l3/l4.../_len and packet_type setuped= . > >> 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 do= esn't > >parse every > >packet originally. Maybe @Mark can give us more inputs from the view of = OVS. >=20 > Hi Jiayu, Konstantin >=20 > For GSO, the application needs to know: > - the packet type (as it only currently supports TCP/IPv4, VxLAN, GRE pac= kets) > - the l2/3/4_lens, etc. (in order to replicate the original packet's head= ers across outgoing segments) >=20 > For this, we can use the rte_net_get_ptype function, as per Konstantin's = suggestion, as it provides both - thanks Konstantin! >=20 > WRT the extra overhead in OvS: TSO is the defacto standard, and GSO is pr= ovided purely as a fallback option. As such, and since the > additional packet parsing is a necessity in order to facilitate GSO, the = additional overhead is IMO acceptable. As I remember, for TSO in DPDK user still have to provide l2/l3/l4_len and = mss information to the PMD. So unless user knows these value straightway (user creates a packet himself= ) some packet processing will be unavailable anyway. Konstantin >=20 > Thanks, > Mark >=20