From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Oct 2017 06:35:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,477,1500966000"; d="scan'208";a="159300947" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by fmsmga006.fm.intel.com with ESMTP; 04 Oct 2017 06:35:49 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.49]) by IRSMSX151.ger.corp.intel.com ([169.254.4.108]) with mapi id 14.03.0319.002; Wed, 4 Oct 2017 14:35:48 +0100 From: "Ananyev, Konstantin" To: "Kavanagh, Mark B" , "dev@dpdk.org" CC: "Hu, Jiayu" , "Tan, Jianfeng" , "Yigit, Ferruh" , "thomas@monjalon.net" Thread-Topic: [PATCH v6 2/6] gso: add TCP/IPv4 GSO support Thread-Index: AQHTO5328sRz3LI55k+Gpuim5UFNzaLTsgnwgAABq3A= 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> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDE5NGE4MTktMTUxZC00NWFjLWFiMjktZDdjNGQ5NTgzYWIwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImNOMkxlUkFvXC9TXC83MGJYcmNLb0VSbVJWQURQcml4NHNhN1MzVUllUHlNaz0ifQ== x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v6 2/6] gso: 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, 04 Oct 2017 13:35:51 -0000 > -----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