From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ananyev, Konstantin" Subject: Re: [PATCH v5] doc: add GRO API limitations in prog_guide Date: Wed, 9 Jan 2019 18:40:06 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258010D901595@irsmsx105.ger.corp.intel.com> References: <1547002811-6989-1-git-send-email-jiayu.hu@intel.com> <1547021995-14231-1-git-send-email-jiayu.hu@intel.com> <20190109102014.41c685b5@hermes.lan> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" , "mb@smartsharesystems.com" , "thomas@monjalon.net" , "Varghese, Vipin" , "stable@dpdk.org" To: Stephen Hemminger , "Hu, Jiayu" Return-path: In-Reply-To: <20190109102014.41c685b5@hermes.lan> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Wednesday, January 9, 2019 6:20 PM > To: Hu, Jiayu > Cc: dev@dpdk.org; Ananyev, Konstantin ; mb@= smartsharesystems.com; thomas@monjalon.net; > Varghese, Vipin ; stable@dpdk.org > Subject: Re: [PATCH v5] doc: add GRO API limitations in prog_guide >=20 > O be merged. > > + > > +GRO Library Limitations > > +----------------------- > > + > > +- GRO library uses the values of MBUF->l2_len/l3_len/l4_len/ > > + outer_l2_len/outer_l3_len to get protocol headers for the > > + input packet, rather than parsing the packet header. Therefore, > > + before call GRO APIs to merge packets, user applications > > + must set MBUF->l2_len/l3_len/l4_len/outer_l2_len/outer_l3_len > > + to the same values as the protocol headers of the packet. > > + >=20 > Since these length values are critical to other functionality > why not require all poll mode drivers to set them. Most of current HW doesn't provide that functionality, so RX function would need to parse (touch) packet data. >>From other side not every rx_burst() consumer does use GRO library. >=20 > Many poll mode drivers call rte_net_get_ptype() on the received > mbuf and it already handles setting this. >=20 > One could argue that GRO should just log and die if it > gets malformed data.