€•bkŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ4/translations/zh_CN/networking/segmentation-offloads”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/zh_TW/networking/segmentation-offloads”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/it_IT/networking/segmentation-offloads”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/ja_JP/networking/segmentation-offloads”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/ko_KR/networking/segmentation-offloads”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/pt_BR/networking/segmentation-offloads”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/sp_SP/networking/segmentation-offloads”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒN/var/lib/git/docbuild/linux/Documentation/networking/segmentation-offloads.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒSegmentation Offloads”h]”hŒSegmentation Offloads”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒ Introduction”h]”hŒ Introduction”…””}”(hhàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÝh²hh³hÇh´K ubhŒ paragraph”“”)”}”(hŒ‘This document describes a set of techniques in the Linux networking stack to take advantage of segmentation offload capabilities of various NICs.”h]”hŒ‘This document describes a set of techniques in the Linux networking stack to take advantage of segmentation offload capabilities of various NICs.”…””}”(hhðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K hhÝh²hubhŒdefinition_list”“”)”}”(hhh]”hŒdefinition_list_item”“”)”}”(hX>The following technologies are described: * TCP Segmentation Offload - TSO * UDP Fragmentation Offload - UFO * IPIP, SIT, GRE, and UDP Tunnel Offloads * Generic Segmentation Offload - GSO * Generic Receive Offload - GRO * Partial Generic Segmentation Offload - GSO_PARTIAL * SCTP acceleration with GSO - GSO_BY_FRAGS ”h]”(hŒterm”“”)”}”(hŒ)The following technologies are described:”h]”hŒ)The following technologies are described:”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´KhjubhŒ definition”“”)”}”(hhh]”hŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒTCP Segmentation Offload - TSO”h]”hï)”}”(hj'h]”hŒTCP Segmentation Offload - TSO”…””}”(hj)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khj%ubah}”(h]”h ]”h"]”h$]”h&]”uh1j#hj ubj$)”}”(hŒUDP Fragmentation Offload - UFO”h]”hï)”}”(hj>h]”hŒUDP Fragmentation Offload - UFO”…””}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khj<ubah}”(h]”h ]”h"]”h$]”h&]”uh1j#hj ubj$)”}”(hŒ'IPIP, SIT, GRE, and UDP Tunnel Offloads”h]”hï)”}”(hjUh]”hŒ'IPIP, SIT, GRE, and UDP Tunnel Offloads”…””}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhjSubah}”(h]”h ]”h"]”h$]”h&]”uh1j#hj ubj$)”}”(hŒ"Generic Segmentation Offload - GSO”h]”hï)”}”(hjlh]”hŒ"Generic Segmentation Offload - GSO”…””}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khjjubah}”(h]”h ]”h"]”h$]”h&]”uh1j#hj ubj$)”}”(hŒGeneric Receive Offload - GRO”h]”hï)”}”(hjƒh]”hŒGeneric Receive Offload - GRO”…””}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1j#hj ubj$)”}”(hŒ2Partial Generic Segmentation Offload - GSO_PARTIAL”h]”hï)”}”(hjšh]”hŒ2Partial Generic Segmentation Offload - GSO_PARTIAL”…””}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khj˜ubah}”(h]”h ]”h"]”h$]”h&]”uh1j#hj ubj$)”}”(hŒ+SCTP acceleration with GSO - GSO_BY_FRAGS ”h]”hï)”}”(hŒ)SCTP acceleration with GSO - GSO_BY_FRAGS”h]”hŒ)SCTP acceleration with GSO - GSO_BY_FRAGS”…””}”(hj³h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khj¯ubah}”(h]”h ]”h"]”h$]”h&]”uh1j#hj ubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1jh³hÇh´Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1hþhhÝh²hh³Nh´Nubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K ubhÉ)”}”(hhh]”(hÎ)”}”(hŒTCP Segmentation Offload”h]”hŒTCP Segmentation Offload”…””}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjéh²hh³hÇh´Kubhï)”}”(hXETCP segmentation allows a device to segment a single frame into multiple frames with a data payload size specified in skb_shinfo()->gso_size. When TCP segmentation requested the bit for either SKB_GSO_TCPV4 or SKB_GSO_TCPV6 should be set in skb_shinfo()->gso_type and skb_shinfo()->gso_size should be set to a non-zero value.”h]”hXETCP segmentation allows a device to segment a single frame into multiple frames with a data payload size specified in skb_shinfo()->gso_size. When TCP segmentation requested the bit for either SKB_GSO_TCPV4 or SKB_GSO_TCPV6 should be set in skb_shinfo()->gso_type and skb_shinfo()->gso_size should be set to a non-zero value.”…””}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khjéh²hubhï)”}”(hŒ¶TCP segmentation is dependent on support for the use of partial checksum offload. For this reason TSO is normally disabled if the Tx checksum offload for a given device is disabled.”h]”hŒ¶TCP segmentation is dependent on support for the use of partial checksum offload. For this reason TSO is normally disabled if the Tx checksum offload for a given device is disabled.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K!hjéh²hubhï)”}”(hXUIn order to support TCP segmentation offload it is necessary to populate the network and transport header offsets of the skbuff so that the device drivers will be able determine the offsets of the IP or IPv6 header and the TCP header. In addition as CHECKSUM_PARTIAL is required csum_start should also point to the TCP header of the packet.”h]”hXUIn order to support TCP segmentation offload it is necessary to populate the network and transport header offsets of the skbuff so that the device drivers will be able determine the offsets of the IP or IPv6 header and the TCP header. In addition as CHECKSUM_PARTIAL is required csum_start should also point to the TCP header of the packet.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K%hjéh²hubhï)”}”(hX For IPv4 segmentation we support one of two types in terms of the IP ID. The default behavior is to increment the IP ID with every segment. If the GSO type SKB_GSO_TCP_FIXEDID is specified then we will not increment the IP ID and all segments will use the same IP ID.”h]”hX For IPv4 segmentation we support one of two types in terms of the IP ID. The default behavior is to increment the IP ID with every segment. If the GSO type SKB_GSO_TCP_FIXEDID is specified then we will not increment the IP ID and all segments will use the same IP ID.”…””}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K+hjéh²hubhï)”}”(hŒÑFor encapsulated packets, SKB_GSO_TCP_FIXEDID refers only to the outer header. SKB_GSO_TCP_FIXEDID_INNER can be used to specify the same for the inner header. Any combination of these two GSO types is allowed.”h]”hŒÑFor encapsulated packets, SKB_GSO_TCP_FIXEDID refers only to the outer header. SKB_GSO_TCP_FIXEDID_INNER can be used to specify the same for the inner header. Any combination of these two GSO types is allowed.”…””}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K0hjéh²hubhï)”}”(hXÖIf a device has NETIF_F_TSO_MANGLEID set then the IP ID can be ignored when performing TSO and we will either increment the IP ID for all frames, or leave it at a static value based on driver preference. For encapsulated packets, NETIF_F_TSO_MANGLEID is relevant for both outer and inner headers, unless the DF bit is not set on the outer header, in which case the device driver must guarantee that the IP ID field is incremented in the outer header with every segment.”h]”hXÖIf a device has NETIF_F_TSO_MANGLEID set then the IP ID can be ignored when performing TSO and we will either increment the IP ID for all frames, or leave it at a static value based on driver preference. For encapsulated packets, NETIF_F_TSO_MANGLEID is relevant for both outer and inner headers, unless the DF bit is not set on the outer header, in which case the device driver must guarantee that the IP ID field is incremented in the outer header with every segment.”…””}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K4hjéh²hubeh}”(h]”Œtcp-segmentation-offload”ah ]”h"]”Œtcp segmentation offload”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒUDP Fragmentation Offload”h]”hŒUDP Fragmentation Offload”…””}”(hjYh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjVh²hh³hÇh´K>ubhï)”}”(hXUDP fragmentation offload allows a device to fragment an oversized UDP datagram into multiple IPv4 fragments. Many of the requirements for UDP fragmentation offload are the same as TSO. However the IPv4 ID for fragments should not increment as a single IPv4 datagram is fragmented.”h]”hXUDP fragmentation offload allows a device to fragment an oversized UDP datagram into multiple IPv4 fragments. Many of the requirements for UDP fragmentation offload are the same as TSO. However the IPv4 ID for fragments should not increment as a single IPv4 datagram is fragmented.”…””}”(hjgh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K@hjVh²hubhï)”}”(hŒ¹UFO is deprecated: modern kernels will no longer generate UFO skbs, but can still receive them from tuntap and similar devices. Offload of UDP-based tunnel protocols is still supported.”h]”hŒ¹UFO is deprecated: modern kernels will no longer generate UFO skbs, but can still receive them from tuntap and similar devices. Offload of UDP-based tunnel protocols is still supported.”…””}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KEhjVh²hubeh}”(h]”Œudp-fragmentation-offload”ah ]”h"]”Œudp fragmentation offload”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K>ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ8IPIP, SIT, GRE, UDP Tunnel, and Remote Checksum Offloads”h]”hŒ8IPIP, SIT, GRE, UDP Tunnel, and Remote Checksum Offloads”…””}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj‹h²hh³hÇh´KKubhï)”}”(hX=In addition to the offloads described above it is possible for a frame to contain additional headers such as an outer tunnel. In order to account for such instances an additional set of segmentation offload types were introduced including SKB_GSO_IPXIP4, SKB_GSO_IPXIP6, SKB_GSO_GRE, and SKB_GSO_UDP_TUNNEL. These extra segmentation types are used to identify cases where there are more than just 1 set of headers. For example in the case of IPIP and SIT we should have the network and transport headers moved from the standard list of headers to "inner" header offsets.”h]”hXAIn addition to the offloads described above it is possible for a frame to contain additional headers such as an outer tunnel. In order to account for such instances an additional set of segmentation offload types were introduced including SKB_GSO_IPXIP4, SKB_GSO_IPXIP6, SKB_GSO_GRE, and SKB_GSO_UDP_TUNNEL. These extra segmentation types are used to identify cases where there are more than just 1 set of headers. For example in the case of IPIP and SIT we should have the network and transport headers moved from the standard list of headers to “inner†header offsets.”…””}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KMhj‹h²hubhï)”}”(hŒþCurrently only two levels of headers are supported. The convention is to refer to the tunnel headers as the outer headers, while the encapsulated data is normally referred to as the inner headers. Below is the list of calls to access the given headers:”h]”hŒþCurrently only two levels of headers are supported. The convention is to refer to the tunnel headers as the outer headers, while the encapsulated data is normally referred to as the inner headers. Below is the list of calls to access the given headers:”…””}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KVhj‹h²hubhï)”}”(hŒIPIP/SIT Tunnel::”h]”hŒIPIP/SIT Tunnel:”…””}”(hj¸h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K[hj‹h²hubhŒ literal_block”“”)”}”(hŒœ Outer Inner MAC skb_mac_header Network skb_network_header skb_inner_network_header Transport skb_transport_header”h]”hŒœ Outer Inner MAC skb_mac_header Network skb_network_header skb_inner_network_header Transport skb_transport_header”…””}”hjÈsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jÆh³hÇh´K]hj‹h²hubhï)”}”(hŒUDP/GRE Tunnel::”h]”hŒUDP/GRE Tunnel:”…””}”(hjÖh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kbhj‹h²hubjÇ)”}”(hŒÖ Outer Inner MAC skb_mac_header skb_inner_mac_header Network skb_network_header skb_inner_network_header Transport skb_transport_header skb_inner_transport_header”h]”hŒÖ Outer Inner MAC skb_mac_header skb_inner_mac_header Network skb_network_header skb_inner_network_header Transport skb_transport_header skb_inner_transport_header”…””}”hjäsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jÆh³hÇh´Kdhj‹h²hubhï)”}”(hŒôIn addition to the above tunnel types there are also SKB_GSO_GRE_CSUM and SKB_GSO_UDP_TUNNEL_CSUM. These two additional tunnel types reflect the fact that the outer header also requests to have a non-zero checksum included in the outer header.”h]”hŒôIn addition to the above tunnel types there are also SKB_GSO_GRE_CSUM and SKB_GSO_UDP_TUNNEL_CSUM. These two additional tunnel types reflect the fact that the outer header also requests to have a non-zero checksum included in the outer header.”…””}”(hjòh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kihj‹h²hubhï)”}”(hŒõFinally there is SKB_GSO_TUNNEL_REMCSUM which indicates that a given tunnel header has requested a remote checksum offload. In this case the inner headers will be left with a partial checksum and only the outer header checksum will be computed.”h]”hŒõFinally there is SKB_GSO_TUNNEL_REMCSUM which indicates that a given tunnel header has requested a remote checksum offload. In this case the inner headers will be left with a partial checksum and only the outer header checksum will be computed.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Knhj‹h²hubeh}”(h]”Œ4ipip-sit-gre-udp-tunnel-and-remote-checksum-offloads”ah ]”h"]”Œ8ipip, sit, gre, udp tunnel, and remote checksum offloads”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KKubhÉ)”}”(hhh]”(hÎ)”}”(hŒGeneric Segmentation Offload”h]”hŒGeneric Segmentation Offload”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´Kuubhï)”}”(hXFGeneric segmentation offload is a pure software offload that is meant to deal with cases where device drivers cannot perform the offloads described above. What occurs in GSO is that a given skbuff will have its data broken out over multiple skbuffs that have been resized to match the MSS provided via skb_shinfo()->gso_size.”h]”hXFGeneric segmentation offload is a pure software offload that is meant to deal with cases where device drivers cannot perform the offloads described above. What occurs in GSO is that a given skbuff will have its data broken out over multiple skbuffs that have been resized to match the MSS provided via skb_shinfo()->gso_size.”…””}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kwhjh²hubhï)”}”(hŒÜBefore enabling any hardware segmentation offload a corresponding software offload is required in GSO. Otherwise it becomes possible for a frame to be re-routed between devices and end up being unable to be transmitted.”h]”hŒÜBefore enabling any hardware segmentation offload a corresponding software offload is required in GSO. Otherwise it becomes possible for a frame to be re-routed between devices and end up being unable to be transmitted.”…””}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K}hjh²hubeh}”(h]”Œgeneric-segmentation-offload”ah ]”h"]”Œgeneric segmentation offload”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KuubhÉ)”}”(hhh]”(hÎ)”}”(hŒGeneric Receive Offload”h]”hŒGeneric Receive Offload”…””}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjKh²hh³hÇh´Kƒubhï)”}”(hXGeneric receive offload is the complement to GSO. Ideally any frame assembled by GRO should be segmented to create an identical sequence of frames using GSO, and any sequence of frames segmented by GSO should be able to be reassembled back to the original by GRO.”h]”hXGeneric receive offload is the complement to GSO. Ideally any frame assembled by GRO should be segmented to create an identical sequence of frames using GSO, and any sequence of frames segmented by GSO should be able to be reassembled back to the original by GRO.”…””}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K…hjKh²hubeh}”(h]”Œgeneric-receive-offload”ah ]”h"]”Œgeneric receive offload”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KƒubhÉ)”}”(hhh]”(hÎ)”}”(hŒ$Partial Generic Segmentation Offload”h]”hŒ$Partial Generic Segmentation Offload”…””}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjrh²hh³hÇh´KŒubhï)”}”(hXÀPartial generic segmentation offload is a hybrid between TSO and GSO. What it effectively does is take advantage of certain traits of TCP and tunnels so that instead of having to rewrite the packet headers for each segment only the inner-most transport header and possibly the outer-most network header need to be updated. This allows devices that do not support tunnel offloads or tunnel offloads with checksum to still make use of segmentation.”h]”hXÀPartial generic segmentation offload is a hybrid between TSO and GSO. What it effectively does is take advantage of certain traits of TCP and tunnels so that instead of having to rewrite the packet headers for each segment only the inner-most transport header and possibly the outer-most network header need to be updated. This allows devices that do not support tunnel offloads or tunnel offloads with checksum to still make use of segmentation.”…””}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KŽhjrh²hubhï)”}”(hX‰With the partial offload what occurs is that all headers excluding the inner transport header are updated such that they will contain the correct values for if the header was simply duplicated. The one exception to this is the outer IPv4 ID field. It is up to the device drivers to guarantee that the IPv4 ID field is incremented in the case that a given header does not have the DF bit set.”h]”hX‰With the partial offload what occurs is that all headers excluding the inner transport header are updated such that they will contain the correct values for if the header was simply duplicated. The one exception to this is the outer IPv4 ID field. It is up to the device drivers to guarantee that the IPv4 ID field is incremented in the case that a given header does not have the DF bit set.”…””}”(hj‘h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K•hjrh²hubeh}”(h]”Œ$partial-generic-segmentation-offload”ah ]”h"]”Œ$partial generic segmentation offload”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KŒubhÉ)”}”(hhh]”(hÎ)”}”(hŒSCTP acceleration with GSO”h]”hŒSCTP acceleration with GSO”…””}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj§h²hh³hÇh´Kžubhï)”}”(hŒ¥SCTP - despite the lack of hardware support - can still take advantage of GSO to pass one large packet through the network stack, rather than multiple small packets.”h]”hŒ¥SCTP - despite the lack of hardware support - can still take advantage of GSO to pass one large packet through the network stack, rather than multiple small packets.”…””}”(hj¸h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K hj§h²hubhï)”}”(hX0This requires a different approach to other offloads, as SCTP packets cannot be just segmented to (P)MTU. Rather, the chunks must be contained in IP segments, padding respected. So unlike regular GSO, SCTP can't just generate a big skb, set gso_size to the fragmentation point and deliver it to IP layer.”h]”hX2This requires a different approach to other offloads, as SCTP packets cannot be just segmented to (P)MTU. Rather, the chunks must be contained in IP segments, padding respected. So unlike regular GSO, SCTP can’t just generate a big skb, set gso_size to the fragmentation point and deliver it to IP layer.”…””}”(hjÆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K¤hj§h²hubhï)”}”(hŒÙInstead, the SCTP protocol layer builds an skb with the segments correctly padded and stored as chained skbs, and skb_segment() splits based on those. To signal this, gso_size is set to the special value GSO_BY_FRAGS.”h]”hŒÙInstead, the SCTP protocol layer builds an skb with the segments correctly padded and stored as chained skbs, and skb_segment() splits based on those. To signal this, gso_size is set to the special value GSO_BY_FRAGS.”…””}”(hjÔh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kªhj§h²hubhï)”}”(hŒ˜Therefore, any code in the core networking stack must be aware of the possibility that gso_size will be GSO_BY_FRAGS and handle that case appropriately.”h]”hŒ˜Therefore, any code in the core networking stack must be aware of the possibility that gso_size will be GSO_BY_FRAGS and handle that case appropriately.”…””}”(hjâh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K®hj§h²hubhï)”}”(hŒ+There are some helpers to make this easier:”h]”hŒ+There are some helpers to make this easier:”…””}”(hjðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K²hj§h²hubj)”}”(hhh]”(j$)”}”(hŒ]skb_is_gso(skb) && skb_is_gso_sctp(skb) is the best way to see if an skb is an SCTP GSO skb. ”h]”hï)”}”(hŒ\skb_is_gso(skb) && skb_is_gso_sctp(skb) is the best way to see if an skb is an SCTP GSO skb.”h]”hŒ\skb_is_gso(skb) && skb_is_gso_sctp(skb) is the best way to see if an skb is an SCTP GSO skb.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K´hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j#hjþh²hh³hÇh´Nubj$)”}”(hŒ`For size checks, the skb_gso_validate_*_len family of helpers correctly considers GSO_BY_FRAGS. ”h]”hï)”}”(hŒ_For size checks, the skb_gso_validate_*_len family of helpers correctly considers GSO_BY_FRAGS.”h]”hŒ_For size checks, the skb_gso_validate_*_len family of helpers correctly considers GSO_BY_FRAGS.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K·hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j#hjþh²hh³hÇh´Nubj$)”}”(hŒ’For manipulating packets, skb_increase_gso_size and skb_decrease_gso_size will check for GSO_BY_FRAGS and WARN if asked to manipulate these skbs. ”h]”hï)”}”(hŒ‘For manipulating packets, skb_increase_gso_size and skb_decrease_gso_size will check for GSO_BY_FRAGS and WARN if asked to manipulate these skbs.”h]”hŒ‘For manipulating packets, skb_increase_gso_size and skb_decrease_gso_size will check for GSO_BY_FRAGS and WARN if asked to manipulate these skbs.”…””}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kºhj1ubah}”(h]”h ]”h"]”h$]”h&]”uh1j#hjþh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÍŒ-”uh1jh³hÇh´K´hj§h²hubhï)”}”(hŒ•This also affects drivers with the NETIF_F_FRAGLIST & NETIF_F_GSO_SCTP bits set. Note also that NETIF_F_GSO_SCTP is included in NETIF_F_GSO_SOFTWARE.”h]”hŒ•This also affects drivers with the NETIF_F_FRAGLIST & NETIF_F_GSO_SCTP bits set. Note also that NETIF_F_GSO_SCTP is included in NETIF_F_GSO_SOFTWARE.”…””}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K½hj§h²hubeh}”(h]”Œsctp-acceleration-with-gso”ah ]”h"]”Œsctp acceleration with gso”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´Kžubeh}”(h]”Œsegmentation-offloads”ah ]”h"]”Œsegmentation offloads”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j‘Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jkjhjæjãjSjPjˆj…jjjHjEjojlj¤j¡jcj`uŒ nametypes”}”(jk‰jæ‰jS‰jˆ‰j‰jH‰jo‰j¤‰jc‰uh}”(jhhÊjãhÝjPjéj…jVjj‹jEjjljKj¡jrj`j§uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.