aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Axtens <dja@axtens.net>2018-02-14 02:05:33 -0500
committerDavid S. Miller <davem@davemloft.net>2018-02-14 14:52:39 -0500
commita677088922831d94d292ca3891b148a8ba0b5fa1 (patch)
tree9fc4eb073da9f15fe7eeb12b0462a1c4707762e1
parentbc3c2431d4173816240679a02fd4d74685e94bc8 (diff)
docs: segmentation-offloads.txt: add SCTP info
Most of this is extracted from 90017accff61 ("sctp: Add GSO support"), with some extra text about GSO_BY_FRAGS and the need to check for it. Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: Daniel Axtens <dja@axtens.net> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--Documentation/networking/segmentation-offloads.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/Documentation/networking/segmentation-offloads.txt b/Documentation/networking/segmentation-offloads.txt
index b247471a183c..d47480b61ac6 100644
--- a/Documentation/networking/segmentation-offloads.txt
+++ b/Documentation/networking/segmentation-offloads.txt
@@ -13,6 +13,7 @@ The following technologies are described:
13 * Generic Segmentation Offload - GSO 13 * Generic Segmentation Offload - GSO
14 * Generic Receive Offload - GRO 14 * Generic Receive Offload - GRO
15 * Partial Generic Segmentation Offload - GSO_PARTIAL 15 * Partial Generic Segmentation Offload - GSO_PARTIAL
16 * SCTP accelleration with GSO - GSO_BY_FRAGS
16 17
17TCP Segmentation Offload 18TCP Segmentation Offload
18======================== 19========================
@@ -132,3 +133,28 @@ values for if the header was simply duplicated. The one exception to this
132is the outer IPv4 ID field. It is up to the device drivers to guarantee 133is the outer IPv4 ID field. It is up to the device drivers to guarantee
133that the IPv4 ID field is incremented in the case that a given header does 134that the IPv4 ID field is incremented in the case that a given header does
134not have the DF bit set. 135not have the DF bit set.
136
137SCTP accelleration with GSO
138===========================
139
140SCTP - despite the lack of hardware support - can still take advantage of
141GSO to pass one large packet through the network stack, rather than
142multiple small packets.
143
144This requires a different approach to other offloads, as SCTP packets
145cannot be just segmented to (P)MTU. Rather, the chunks must be contained in
146IP segments, padding respected. So unlike regular GSO, SCTP can't just
147generate a big skb, set gso_size to the fragmentation point and deliver it
148to IP layer.
149
150Instead, the SCTP protocol layer builds an skb with the segments correctly
151padded and stored as chained skbs, and skb_segment() splits based on those.
152To signal this, gso_size is set to the special value GSO_BY_FRAGS.
153
154Therefore, any code in the core networking stack must be aware of the
155possibility that gso_size will be GSO_BY_FRAGS and handle that case
156appropriately. (For size checks, the skb_gso_validate_*_len family of
157helpers do this automatically.)
158
159This also affects drivers with the NETIF_F_FRAGLIST & NETIF_F_GSO_SCTP bits
160set. Note also that NETIF_F_GSO_SCTP is included in NETIF_F_GSO_SOFTWARE.