[dpdk-dev] [PATCH v6 2/6] gso: add TCP/IPv4 GSO support

Kavanagh, Mark B mark.b.kavanagh at intel.com
Wed Oct 4 16:22:37 CEST 2017



>-----Original Message-----
>From: Ananyev, Konstantin
>Sent: Wednesday, October 4, 2017 2:36 PM
>To: Kavanagh, Mark B <mark.b.kavanagh at intel.com>; dev at dpdk.org
>Cc: Hu, Jiayu <jiayu.hu at intel.com>; Tan, Jianfeng <jianfeng.tan at intel.com>;
>Yigit, Ferruh <ferruh.yigit at intel.com>; thomas at monjalon.net
>Subject: RE: [PATCH v6 2/6] gso: add TCP/IPv4 GSO support
>
>
>
>> -----Original Message-----
>> From: Ananyev, Konstantin
>> Sent: Wednesday, October 4, 2017 2:32 PM
>> To: Kavanagh, Mark B <mark.b.kavanagh at intel.com>; dev at dpdk.org
>> Cc: Hu, Jiayu <jiayu.hu at intel.com>; Tan, Jianfeng <jianfeng.tan at intel.com>;
>Yigit, Ferruh <ferruh.yigit at intel.com>; thomas at monjalon.net
>> Subject: RE: [PATCH v6 2/6] gso: add TCP/IPv4 GSO support
>>
>> Hi Mark,
>>
>> > -----Original Message-----
>> > From: Kavanagh, Mark B
>> > Sent: Monday, October 2, 2017 5:46 PM
>> > To: dev at dpdk.org
>> > Cc: Hu, Jiayu <jiayu.hu at intel.com>; Tan, Jianfeng
><jianfeng.tan at intel.com>; Ananyev, Konstantin <konstantin.ananyev at intel.com>;
>> Yigit,
>> > Ferruh <ferruh.yigit at intel.com>; thomas at monjalon.net; Kavanagh, Mark B
><mark.b.kavanagh at intel.com>
>> > Subject: [PATCH v6 2/6] gso: add TCP/IPv4 GSO support
>> >
>> > From: Jiayu Hu <jiayu.hu at intel.com>
>> >
>> > 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 requires
>> > 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 <jiayu.hu at intel.com>
>> > Signed-off-by: Mark Kavanagh <mark.b.kavanagh at intel.com>
>> > Tested-by: Lei Yao <lei.a.yao at intel.com>
>> > ---
>> >  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_notes/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.
>> >       =========================================================
>> >
>> > +* **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
>

Okay, I'll remove any mention of VLAN tags in the description - thanks!


More information about the dev mailing list