From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v5] doc: add GRO API limitations in prog_guide Date: Wed, 9 Jan 2019 10:20:14 -0800 Message-ID: <20190109102014.41c685b5@hermes.lan> References: <1547002811-6989-1-git-send-email-jiayu.hu@intel.com> <1547021995-14231-1-git-send-email-jiayu.hu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, konstantin.ananyev@intel.com, mb@smartsharesystems.com, thomas@monjalon.net, vipin.varghese@intel.com, stable@dpdk.org To: Jiayu Hu Return-path: Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 870261B4C8 for ; Wed, 9 Jan 2019 19:20:22 +0100 (CET) Received: by mail-pg1-f196.google.com with SMTP id z11so3668359pgu.0 for ; Wed, 09 Jan 2019 10:20:22 -0800 (PST) In-Reply-To: <1547021995-14231-1-git-send-email-jiayu.hu@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. > + Since these length values are critical to other functionality why not require all poll mode drivers to set them. Many poll mode drivers call rte_net_get_ptype() on the received mbuf and it already handles setting this. One could argue that GRO should just log and die if it gets malformed data.