path: root/lib/librte_gso/
diff options
authorJiayu Hu <>2017-10-07 22:56:39 +0800
committerFerruh Yigit <>2017-10-12 01:36:57 +0100
commitec51443cc99a6e20e8e2210d92d59ae760971f90 (patch)
tree8eebe7362b8450556fd16ea09bd93f1ee63add58 /lib/librte_gso/
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 'lib/librte_gso/')
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/librte_gso/ b/lib/librte_gso/
new file mode 100644
index 0000000..e1fd453
--- /dev/null
+++ b/lib/librte_gso/
@@ -0,0 +1,7 @@
+DPDK_17.11 {
+ global:
+ rte_gso_segment;
+ local: *;