From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ananyev, Konstantin" Subject: Re: [PATCH v6 2/6] gso: add TCP/IPv4 GSO support Date: Wed, 4 Oct 2017 13:35:47 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772585FAA3D73@IRSMSX103.ger.corp.intel.com> References: <1506636833-25851-1-git-send-email-mark.b.kavanagh@intel.com> <1506962749-106779-1-git-send-email-mark.b.kavanagh@intel.com> <1506962749-106779-3-git-send-email-mark.b.kavanagh@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "Hu, Jiayu" , "Tan, Jianfeng" , "Yigit, Ferruh" , "thomas@monjalon.net" To: "Kavanagh, Mark B" , "dev@dpdk.org" Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 263AE1B665 for ; Wed, 4 Oct 2017 15:35:50 +0200 (CEST) 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: Ananyev, Konstantin > Sent: Wednesday, October 4, 2017 2:32 PM > To: Kavanagh, Mark B ; dev@dpdk.org > Cc: Hu, Jiayu ; Tan, Jianfeng ; Yigit, Ferruh ; thomas@monjalon.net > Subject: RE: [PATCH v6 2/6] gso: add TCP/IPv4 GSO support >=20 > Hi Mark, >=20 > > -----Original Message----- > > From: Kavanagh, Mark B > > Sent: Monday, October 2, 2017 5:46 PM > > To: dev@dpdk.org > > Cc: Hu, Jiayu ; Tan, Jianfeng ; Ananyev, Konstantin ; > Yigit, > > Ferruh ; thomas@monjalon.net; Kavanagh, Mark B = > > Subject: [PATCH v6 2/6] gso: add TCP/IPv4 GSO support > > > > From: Jiayu Hu > > > > This patch adds GSO support for TCP/IPv4 packets. Supported packets > > may include a single VLAN tag. TCP/IPv4 GSO doesn't check if input > > packets have correct checksums, and doesn't update checksums for > > output packets (the responsibility for this lies with the application). > > Additionally, TCP/IPv4 GSO doesn't process IP fragmented packets. > > > > TCP/IPv4 GSO uses two chained MBUFs, one direct MBUF and one indrect > > MBUF, to organize an output packet. Note that we refer to these two > > chained MBUFs as a two-segment MBUF. The direct MBUF stores the packet > > header, while the indirect mbuf simply points to a location within the > > original packet's payload. Consequently, use of the GSO library require= s > > multi-segment MBUF support in the TX functions of the NIC driver. > > > > If a packet is GSO'd, TCP/IPv4 GSO reduces its MBUF refcnt by 1. As a > > result, when all of its GSOed segments are freed, the packet is freed > > automatically. > > > > Signed-off-by: Jiayu Hu > > Signed-off-by: Mark Kavanagh > > Tested-by: Lei Yao > > --- > > doc/guides/rel_notes/release_17_11.rst | 12 +++ > > lib/librte_eal/common/include/rte_log.h | 1 + > > lib/librte_gso/Makefile | 2 + > > lib/librte_gso/gso_common.c | 153 ++++++++++++++++++++++++= ++++++++ > > lib/librte_gso/gso_common.h | 141 ++++++++++++++++++++++++= +++++ > > lib/librte_gso/gso_tcp4.c | 104 ++++++++++++++++++++++ > > lib/librte_gso/gso_tcp4.h | 74 +++++++++++++++ > > lib/librte_gso/rte_gso.c | 52 ++++++++++- > > 8 files changed, 536 insertions(+), 3 deletions(-) > > create mode 100644 lib/librte_gso/gso_common.c > > create mode 100644 lib/librte_gso/gso_common.h > > create mode 100644 lib/librte_gso/gso_tcp4.c > > create mode 100644 lib/librte_gso/gso_tcp4.h > > > > diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_no= tes/release_17_11.rst > > index 7508be7..c414f73 100644 > > --- a/doc/guides/rel_notes/release_17_11.rst > > +++ b/doc/guides/rel_notes/release_17_11.rst > > @@ -41,6 +41,18 @@ New Features > > Also, make sure to start the actual text at the margin. > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > > +* **Added the Generic Segmentation Offload Library.** > > + > > + Added the Generic Segmentation Offload (GSO) library to enable > > + applications to split large packets (e.g. MTU is 64KB) into small > > + ones (e.g. MTU is 1500B). Supported packet types are: > > + > > + * TCP/IPv4 packets, which may include a single VLAN tag. As a nit: I think it doesn't matter as you are relying on mbuf->l2_len. Konstantin