path: root/doc/api
diff options
authorJiayu Hu <>2017-10-07 22:56:39 +0800
committerFerruh Yigit <>2017-10-12 01:36:57 +0100
commitec51443cc99a6e20e8e2210d92d59ae760971f90 (patch)
tree8eebe7362b8450556fd16ea09bd93f1ee63add58 /doc/api
parentb7091f1dcfbc62f358b4c1882d51c434471d51da (diff)
gso: add Generic Segmentation Offload API framework
Generic Segmentation Offload (GSO) is a SW technique to split large packets into small ones. Akin to TSO, GSO enables applications to operate on large packets, thus reducing per-packet processing overhead. To enable more flexibility to applications, DPDK GSO is implemented as a standalone library. Applications explicitly use the GSO library to segment packets. To segment a packet requires two steps. The first is to set proper flags to mbuf->ol_flags, where the flags are the same as that of TSO. The second is to call the segmentation API, rte_gso_segment(). This patch introduces the GSO API framework to DPDK. rte_gso_segment() splits an input packet into small ones in each invocation. The GSO library refers to these small packets generated by rte_gso_segment() as GSO segments. Each of the newly-created GSO segments is organized as a two-segment MBUF, where the first segment is a standard MBUF, which stores a copy of packet header, and the second is an indirect MBUF which points to a section of data in the input packet. rte_gso_segment() reduces the refcnt of the input packet by 1. Therefore, when all GSO segments are freed, the input packet is freed automatically. Additionally, since each GSO segment has multiple MBUFs (i.e. 2 MBUFs), the driver of the interface which the GSO segments are sent to should support to transmit multi-segment packets. The GSO framework clears the PKT_TX_TCP_SEG flag for both the input packet, and all produced GSO segments in the event of success, since segmentation in hardware is no longer required at that point. Signed-off-by: Jiayu Hu <> Signed-off-by: Mark Kavanagh <> Acked-by: Konstantin Ananyev <>
Diffstat (limited to 'doc/api')
2 files changed, 2 insertions, 0 deletions
diff --git a/doc/api/ b/doc/api/
index c34f04f..02e92a4 100644
--- a/doc/api/
+++ b/doc/api/
@@ -103,6 +103,7 @@ The public API headers are grouped by topics:
[TCP] (@ref rte_tcp.h),
[UDP] (@ref rte_udp.h),
[GRO] (@ref rte_gro.h),
+ [GSO] (@ref rte_gso.h),
[frag/reass] (@ref rte_ip_frag.h),
[LPM IPv4 route] (@ref rte_lpm.h),
[LPM IPv6 route] (@ref rte_lpm6.h),
diff --git a/doc/api/doxy-api.conf b/doc/api/doxy-api.conf
index e9d6ffa..91bb090 100644
--- a/doc/api/doxy-api.conf
+++ b/doc/api/doxy-api.conf
@@ -48,6 +48,7 @@ INPUT = doc/api/ \
lib/librte_ether \
lib/librte_eventdev \
lib/librte_gro \
+ lib/librte_gso \
lib/librte_hash \
lib/librte_ip_frag \
lib/librte_jobstats \