€•Œ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”Œ0/translations/zh_CN/networking/checksum-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”Œ0/translations/zh_TW/networking/checksum-offloads”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/it_IT/networking/checksum-offloads”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/ja_JP/networking/checksum-offloads”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/ko_KR/networking/checksum-offloads”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/pt_BR/networking/checksum-offloads”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/sp_SP/networking/checksum-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³ŒJ/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads.rst”h´KubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒChecksum Offloads”h]”hŒChecksum 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 checksum offload capabilities of various NICs.”h]”hŒ�This document describes a set of techniques in the Linux networking stack to take advantage of checksum offload capabilities of various NICs.”…”�”}”(hhðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K hhÝh²hubhï)�”}”(hŒ)The following technologies are described:”h]”hŒ)The following technologies are described:”…”�”}”(hhþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubhŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒTX Checksum Offload”h]”hï)�”}”(hjh]”hŒTX Checksum Offload”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubj)�”}”(hŒLCO: Local Checksum Offload”h]”hï)�”}”(hj,h]”hŒLCO: Local Checksum Offload”…”�”}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khj*ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubj)�”}”(hŒRCO: Remote Checksum Offload ”h]”hï)�”}”(hŒRCO: Remote Checksum Offload”h]”hŒRCO: Remote Checksum Offload”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhjAubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1j h³hÇh´KhhÝh²hubhï)�”}”(hŒ5Things that should be documented here but aren't yet:”h]”hŒ7Things that should be documented here but aren’t yet:”…”�”}”(hjah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubj )�”}”(hhh]”j)�”}”(hŒ!CHECKSUM_UNNECESSARY conversion ”h]”hï)�”}”(hŒCHECKSUM_UNNECESSARY conversion”h]”hŒCHECKSUM_UNNECESSARY conversion”…”�”}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khjrubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjoh²hh³hÇh´Nubah}”(h]”h ]”h"]”h$]”h&]”j_j`uh1j h³hÇh´KhhÝh²hubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒTX Checksum Offload”h]”hŒTX Checksum Offload”…”�”}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj˜h²hh³hÇh´Kubhï)�”}”(hXeIn brief, Tx checksum offload allows to request the device fill in a single ones-complement checksum defined by the sk_buff fields skb->csum_start and skb->csum_offset. The device should compute the 16-bit ones-complement checksum (i.e. the 'IP-style' checksum) from csum_start to the end of the packet, and fill in the result at (csum_start + csum_offset).”h]”hXiIn brief, Tx checksum offload allows to request the device fill in a single ones-complement checksum defined by the sk_buff fields skb->csum_start and skb->csum_offset. The device should compute the 16-bit ones-complement checksum (i.e. the ‘IP-style’ checksum) from csum_start to the end of the packet, and fill in the result at (csum_start + csum_offset).”…”�”}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khj˜h²hubhï)�”}”(hXBecause csum_offset cannot be negative, this ensures that the previous value of the checksum field is included in the checksum computation, thus it can be used to supply any needed corrections to the checksum (such as the sum of the pseudo-header for UDP or TCP).”h]”hXBecause csum_offset cannot be negative, this ensures that the previous value of the checksum field is included in the checksum computation, thus it can be used to supply any needed corrections to the checksum (such as the sum of the pseudo-header for UDP or TCP).”…”�”}”(hj·h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K#hj˜h²hubhï)�”}”(hŒòThis interface only allows a single checksum to be offloaded. Where encapsulation is used, the packet may have multiple checksum fields in different header layers, and the rest will have to be handled by another mechanism such as LCO or RCO.”h]”hŒòThis interface only allows a single checksum to be offloaded. Where encapsulation is used, the packet may have multiple checksum fields in different header layers, and the rest will have to be handled by another mechanism such as LCO or RCO.”…”�”}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K(hj˜h²hubhï)�”}”(hXSCTP CRC32c can also be offloaded using this interface, by means of filling skb->csum_start and skb->csum_offset as described above, setting skb->csum_not_inet, and advertising NETIF_F_SCTP_CRC. Drivers must not treat ordinary IP checksum offload as SCTP CRC32c support.”h]”hXSCTP CRC32c can also be offloaded using this interface, by means of filling skb->csum_start and skb->csum_offset as described above, setting skb->csum_not_inet, and advertising NETIF_F_SCTP_CRC. Drivers must not treat ordinary IP checksum offload as SCTP CRC32c support.”…”�”}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K-hj˜h²hubhï)�”}”(hŒÜNo offloading of the IP header checksum is performed; it is always done in software. This is OK because when we build the IP header, we obviously have it in cache, so summing it isn't expensive. It's also rather short.”h]”hŒàNo offloading of the IP header checksum is performed; it is always done in software. This is OK because when we build the IP header, we obviously have it in cache, so summing it isn’t expensive. It’s also rather short.”…”�”}”(hjáh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K2hj˜h²hubhï)�”}”(hŒÀThe requirements for GSO are more complicated, because when segmenting an encapsulated packet both the inner and outer checksums may need to be edited or recomputed for each resulting segment.”h]”hŒÀThe requirements for GSO are more complicated, because when segmenting an encapsulated packet both the inner and outer checksums may need to be edited or recomputed for each resulting segment.”…”�”}”(hjïh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K6hj˜h²hubhï)�”}”(hXêA driver declares its offload capabilities in netdev->hw_features; see Documentation/networking/netdev-features.rst for more. NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM are restricted legacy features and are being deprecated in favor of NETIF_F_HW_CSUM. New devices should use NETIF_F_HW_CSUM to advertise generic checksum offload. The skb_csum_hwoffload_help() helper can resolve CHECKSUM_PARTIAL according to the device's advertised checksum capabilities, falling back to software when needed.”h]”hXìA driver declares its offload capabilities in netdev->hw_features; see Documentation/networking/netdev-features.rst for more. NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM are restricted legacy features and are being deprecated in favor of NETIF_F_HW_CSUM. New devices should use NETIF_F_HW_CSUM to advertise generic checksum offload. The skb_csum_hwoffload_help() helper can resolve CHECKSUM_PARTIAL according to the device’s advertised checksum capabilities, falling back to software when needed.”…”�”}”(hjýh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K:hj˜h²hubhï)�”}”(hX@The stack should, for the most part, assume that checksum offload is supported by the underlying device. The only place that should check is validate_xmit_skb(), and the functions it calls directly or indirectly. That function compares the offload features requested by the SKB (which may include other offloads besides TX Checksum Offload) and, if they are not supported or enabled on the device (determined by netdev->features), performs the corresponding offload in software. In the case of TX Checksum Offload, that means calling skb_csum_hwoffload_help(skb, features).”h]”hX@The stack should, for the most part, assume that checksum offload is supported by the underlying device. The only place that should check is validate_xmit_skb(), and the functions it calls directly or indirectly. That function compares the offload features requested by the SKB (which may include other offloads besides TX Checksum Offload) and, if they are not supported or enabled on the device (determined by netdev->features), performs the corresponding offload in software. In the case of TX Checksum Offload, that means calling skb_csum_hwoffload_help(skb, features).”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KBhj˜h²hubeh}”(h]”Œtx-checksum-offload”ah ]”h"]”Œtx checksum offload”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒLCO: Local Checksum Offload”h]”hŒLCO: Local Checksum Offload”…”�”}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj!h²hh³hÇh´KMubhï)�”}”(hŒ‹LCO is a technique for efficiently computing the outer checksum of an encapsulated datagram when the inner checksum is due to be offloaded.”h]”hŒ‹LCO is a technique for efficiently computing the outer checksum of an encapsulated datagram when the inner checksum is due to be offloaded.”…”�”}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KOhj!h²hubhï)�”}”(hXThe ones-complement sum of a correctly checksummed TCP or UDP packet is equal to the complement of the sum of the pseudo header, because everything else gets 'cancelled out' by the checksum field. This is because the sum was complemented before being written to the checksum field.”h]”hXThe ones-complement sum of a correctly checksummed TCP or UDP packet is equal to the complement of the sum of the pseudo header, because everything else gets ‘cancelled out’ by the checksum field. This is because the sum was complemented before being written to the checksum field.”…”�”}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KRhj!h²hubhï)�”}”(hŒ–More generally, this holds in any case where the 'IP-style' ones complement checksum is used, and thus any checksum that TX Checksum Offload supports.”h]”hŒšMore generally, this holds in any case where the ‘IP-style’ ones complement checksum is used, and thus any checksum that TX Checksum Offload supports.”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KWhj!h²hubhï)�”}”(hXéThat is, if we have set up TX Checksum Offload with a start/offset pair, we know that after the device has filled in that checksum, the ones complement sum from csum_start to the end of the packet will be equal to the complement of whatever value we put in the checksum field beforehand. This allows us to compute the outer checksum without looking at the payload: we simply stop summing when we get to csum_start, then add the complement of the 16-bit word at (csum_start + csum_offset).”h]”hXéThat is, if we have set up TX Checksum Offload with a start/offset pair, we know that after the device has filled in that checksum, the ones complement sum from csum_start to the end of the packet will be equal to the complement of whatever value we put in the checksum field beforehand. This allows us to compute the outer checksum without looking at the payload: we simply stop summing when we get to csum_start, then add the complement of the 16-bit word at (csum_start + csum_offset).”…”�”}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KZhj!h²hubhï)�”}”(hŒ£Then, when the true inner checksum is filled in (either by hardware or by skb_checksum_help()), the outer checksum will become correct by virtue of the arithmetic.”h]”hŒ£Then, when the true inner checksum is filled in (either by hardware or by skb_checksum_help()), the outer checksum will become correct by virtue of the arithmetic.”…”�”}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kbhj!h²hubhï)�”}”(hŒ½LCO is performed by the stack when constructing an outer UDP header for an encapsulation such as VXLAN or GENEVE, in udp_set_csum(). Similarly for the IPv6 equivalents, in udp6_set_csum().”h]”hŒ½LCO is performed by the stack when constructing an outer UDP header for an encapsulation such as VXLAN or GENEVE, in udp_set_csum(). Similarly for the IPv6 equivalents, in udp6_set_csum().”…”�”}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kfhj!h²hubhï)�”}”(hŒ›It is also performed when constructing GRE headers with the shared gre_build_header() helper in include/net/gre.h, which is used by both IPv4 and IPv6 GRE.”h]”hŒ›It is also performed when constructing GRE headers with the shared gre_build_header() helper in include/net/gre.h, which is used by both IPv4 and IPv6 GRE.”…”�”}”(hj†h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kjhj!h²hubhï)�”}”(hŒ[All of the LCO implementations use a helper function lco_csum(), in include/linux/skbuff.h.”h]”hŒ[All of the LCO implementations use a helper function lco_csum(), in include/linux/skbuff.h.”…”�”}”(hj”h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Knhj!h²hubhï)�”}”(hXELCO can safely be used for nested encapsulations; in this case, the outer encapsulation layer will sum over both its own header and the 'middle' header. This does mean that the 'middle' header will get summed multiple times, but there doesn't seem to be a way to avoid that without incurring bigger costs (e.g. in SKB bloat).”h]”hXOLCO can safely be used for nested encapsulations; in this case, the outer encapsulation layer will sum over both its own header and the ‘middle’ header. This does mean that the ‘middle’ header will get summed multiple times, but there doesn’t seem to be a way to avoid that without incurring bigger costs (e.g. in SKB bloat).”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kqhj!h²hubeh}”(h]”Œlco-local-checksum-offload”ah ]”h"]”Œlco: local checksum offload”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KMubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒRCO: Remote Checksum Offload”h]”hŒRCO: Remote Checksum Offload”…”�”}”(hj»h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj¸h²hh³hÇh´Kyubhï)�”}”(hXRCO is a technique for eliding the inner checksum of an encapsulated datagram, allowing the outer checksum to be offloaded. It does, however, involve a change to the encapsulation protocols, which the receiver must also support. For this reason, it is disabled by default.”h]”hXRCO is a technique for eliding the inner checksum of an encapsulated datagram, allowing the outer checksum to be offloaded. It does, however, involve a change to the encapsulation protocols, which the receiver must also support. For this reason, it is disabled by default.”…”�”}”(hjÉh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K{hj¸h²hubhï)�”}”(hŒ1RCO is detailed in the following Internet-Drafts:”h]”hŒ1RCO is detailed in the following Internet-Drafts:”…”�”}”(hj×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K€hj¸h²hubj )�”}”(hhh]”(j)�”}”(hŒ>https://tools.ietf.org/html/draft-herbert-remotecsumoffload-00”h]”hï)�”}”(hjêh]”hŒ reference”“”)�”}”(hjêh]”hŒ>https://tools.ietf.org/html/draft-herbert-remotecsumoffload-00”…”�”}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jêuh1jïhjìubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K‚hjèubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjåh²hh³hÇh´Nubj)�”}”(hŒ7https://tools.ietf.org/html/draft-herbert-vxlan-rco-00 ”h]”hï)�”}”(hŒ6https://tools.ietf.org/html/draft-herbert-vxlan-rco-00”h]”jð)�”}”(hjh]”hŒ6https://tools.ietf.org/html/draft-herbert-vxlan-rco-00”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”juh1jïhjubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kƒhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjåh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”j_j`uh1j h³hÇh´K‚hj¸h²hubhï)�”}”(hŒøIn Linux, RCO is implemented individually in each encapsulation protocol, and most tunnel types have flags controlling its use. For instance, VXLAN has the configuration flag VXLAN_F_REMCSUM_TX to indicate that RCO should be used when transmitting.”h]”hŒøIn Linux, RCO is implemented individually in each encapsulation protocol, and most tunnel types have flags controlling its use. For instance, VXLAN has the configuration flag VXLAN_F_REMCSUM_TX to indicate that RCO should be used when transmitting.”…”�”}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K…hj¸h²hubeh}”(h]”Œrco-remote-checksum-offload”ah ]”h"]”Œrco: remote checksum offload”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KyubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒRX Checksum Offload”h]”hŒRX Checksum Offload”…”�”}”(hjLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjIh²hh³hÇh´KŒubhï)�”}”(hXRX checksum offload is controlled via NETIF_F_RXCSUM. When disabled the driver must not set skb->ip_summed on ingress packets. As mentioned, IPv4 checksum is not offloaded, the RXCSUM feature controls the offload of verification of transport layer checksums.”h]”hXRX checksum offload is controlled via NETIF_F_RXCSUM. When disabled the driver must not set skb->ip_summed on ingress packets. As mentioned, IPv4 checksum is not offloaded, the RXCSUM feature controls the offload of verification of transport layer checksums.”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KŽhjIh²hubhï)�”}”(hX¢Note that packets with bad TCP/UDP checksums must still be passed to the stack. skb->ip_summed of such packets can be set to ``CHECKSUM_COMPLETE`` or left at ``CHECKSUM_NONE``. Drivers **must not discard** packets with bad TCP/UDP checksum and must not configure the device to drop them. Checksum validation is relatively inexpensive and having bad packets reflected in SNMP counters is crucial for network monitoring.”h]”(hŒ}Note that packets with bad TCP/UDP checksums must still be passed to the stack. skb->ip_summed of such packets can be set to ”…”�”}”(hjhh²hh³Nh´NubhŒliteral”“”)�”}”(hŒ``CHECKSUM_COMPLETE``”h]”hŒCHECKSUM_COMPLETE”…”�”}”(hjrh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjhubhŒ or left at ”…”�”}”(hjhh²hh³Nh´Nubjq)�”}”(hŒ``CHECKSUM_NONE``”h]”hŒ CHECKSUM_NONE”…”�”}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjhubhŒ . Drivers ”…”�”}”(hjhh²hh³Nh´NubhŒstrong”“”)�”}”(hŒ**must not discard**”h]”hŒmust not discard”…”�”}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j–hjhubhŒÕ packets with bad TCP/UDP checksum and must not configure the device to drop them. Checksum validation is relatively inexpensive and having bad packets reflected in SNMP counters is crucial for network monitoring.”…”�”}”(hjhh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K“hjIh²hubeh}”(h]”Œrx-checksum-offload”ah ]”h"]”Œrx checksum offload”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KŒubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒskb checksum documentation”h]”hŒskb checksum documentation”…”�”}”(hj»h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj¸h²hh³hÇh´K›ubhï)�”}”(hŒ\The interface for checksum offload between the stack and networking drivers is as follows...”h]”hŒ\The interface for checksum offload between the stack and networking drivers is as follows...”…”�”}”(hjÉh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´K,hj¸h²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒIP checksum related features”h]”hŒIP checksum related features”…”�”}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjØh³Nh´Nubhï)�”}”(hŒõDrivers advertise checksum offload capabilities in the features of a device. From the stack's point of view these are capabilities offered by the driver. A driver typically only advertises features that it is capable of offloading to its device.”h]”hŒ÷Drivers advertise checksum offload capabilities in the features of a device. From the stack’s point of view these are capabilities offered by the driver. A driver typically only advertises features that it is capable of offloading to its device.”…”�”}”(hjéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´K2hjØubhŒtable”“”)�”}”(hhh]”(hÎ)�”}”(hŒ Checksum related device features”h]”hŒ Checksum related device features”…”�”}”(hjýh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´K7hjúubhŒtgroup”“”)�”}”(hhh]”(hŒcolspec”“”)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jhjubj)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K uh1jhjubhŒtbody”“”)�”}”(hhh]”(hŒrow”“”)�”}”(hhh]”(hŒentry”“”)�”}”(hhh]”hï)�”}”(hŒ``NETIF_F_HW_CSUM``”h]”jq)�”}”(hj8h]”hŒNETIF_F_HW_CSUM”…”�”}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphj6ubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´K:hj3ubah}”(h]”h ]”h"]”h$]”h&]”uh1j1hj.ubj2)�”}”(hhh]”hï)�”}”(hŒäThe driver (or its device) is able to compute one IP (one's complement) checksum for any combination of protocols or protocol layering. The checksum is computed and set in a packet per the CHECKSUM_PARTIAL interface (see below).”h]”hŒæThe driver (or its device) is able to compute one IP (one’s complement) checksum for any combination of protocols or protocol layering. The checksum is computed and set in a packet per the CHECKSUM_PARTIAL interface (see below).”…”�”}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´K;hjTubah}”(h]”h ]”h"]”h$]”h&]”uh1j1hj.ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j,hj)ubj-)�”}”(hhh]”(j2)�”}”(hhh]”hï)�”}”(hŒ``NETIF_F_IP_CSUM``”h]”jq)�”}”(hjzh]”hŒNETIF_F_IP_CSUM”…”�”}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjxubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KAhjuubah}”(h]”h ]”h"]”h$]”h&]”uh1j1hjrubj2)�”}”(hhh]”hï)�”}”(hXDriver (device) is only able to checksum plain TCP or UDP packets over IPv4. These are specifically unencapsulated packets of the form IPv4|TCP or IPv4|UDP where the Protocol field in the IPv4 header is TCP or UDP. The IPv4 header may contain IP options. This feature cannot be set in features for a device with NETIF_F_HW_CSUM also set. This feature is being DEPRECATED (see below).”h]”hXDriver (device) is only able to checksum plain TCP or UDP packets over IPv4. These are specifically unencapsulated packets of the form IPv4|TCP or IPv4|UDP where the Protocol field in the IPv4 header is TCP or UDP. The IPv4 header may contain IP options. This feature cannot be set in features for a device with NETIF_F_HW_CSUM also set. This feature is being DEPRECATED (see below).”…”�”}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KBhj–ubah}”(h]”h ]”h"]”h$]”h&]”uh1j1hjrubeh}”(h]”h ]”h"]”h$]”h&]”uh1j,hj)ubj-)�”}”(hhh]”(j2)�”}”(hhh]”hï)�”}”(hŒ``NETIF_F_IPV6_CSUM``”h]”jq)�”}”(hj¼h]”hŒNETIF_F_IPV6_CSUM”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjºubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KKhj·ubah}”(h]”h ]”h"]”h$]”h&]”uh1j1hj´ubj2)�”}”(hhh]”hï)�”}”(hX�Driver (device) is only able to checksum plain TCP or UDP packets over IPv6. These are specifically unencapsulated packets of the form IPv6|TCP or IPv6|UDP where the Next Header field in the IPv6 header is either TCP or UDP. IPv6 extension headers are not supported with this feature. This feature cannot be set in features for a device with NETIF_F_HW_CSUM also set. This feature is being DEPRECATED (see below).”h]”hX�Driver (device) is only able to checksum plain TCP or UDP packets over IPv6. These are specifically unencapsulated packets of the form IPv6|TCP or IPv6|UDP where the Next Header field in the IPv6 header is either TCP or UDP. IPv6 extension headers are not supported with this feature. This feature cannot be set in features for a device with NETIF_F_HW_CSUM also set. This feature is being DEPRECATED (see below).”…”�”}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KLhjØubah}”(h]”h ]”h"]”h$]”h&]”uh1j1hj´ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j,hj)ubj-)�”}”(hhh]”(j2)�”}”(hhh]”hï)�”}”(hŒ``NETIF_F_RXCSUM``”h]”jq)�”}”(hjþh]”hŒNETIF_F_RXCSUM”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjüubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KVhjùubah}”(h]”h ]”h"]”h$]”h&]”uh1j1hjöubj2)�”}”(hhh]”hï)�”}”(hŒùDriver (device) performs receive checksum offload. This flag is only used to disable the RX checksum feature for a device. The stack will accept receive checksum indication in packets received on a device regardless of whether NETIF_F_RXCSUM is set.”h]”hŒùDriver (device) performs receive checksum offload. This flag is only used to disable the RX checksum feature for a device. The stack will accept receive checksum indication in packets received on a device regardless of whether NETIF_F_RXCSUM is set.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KWhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j1hjöubeh}”(h]”h ]”h"]”h$]”h&]”uh1j,hj)ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'hjubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j hjúubeh}”(h]”Œid1”ah ]”h"]”h$]”h&]”uh1jøhjØubeh}”(h]”Œip-checksum-related-features”ah ]”h"]”Œip checksum related features”ah$]”h&]”uh1hÈhj¸h²hh³Nh´NubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ*Checksumming of received packets by device”h]”hŒ*Checksumming of received packets by device”…”�”}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjTh³Nh´Nubhï)�”}”(hŒiIndication of checksum verification is set in :c:type:`sk_buff.ip_summed `. Possible values are:”h]”(hŒ.Indication of checksum verification is set in ”…”�”}”(hjeh²hh³Nh´Nubh)�”}”(hŒ%:c:type:`sk_buff.ip_summed `”h]”jq)�”}”(hjoh]”hŒsk_buff.ip_summed”…”�”}”(hjqh²hh³Nh´Nubah}”(h]”h ]”(Œxref”Œc”Œc-type”eh"]”h$]”h&]”uh1jphjmubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œnetworking/checksum-offloads”Œ refdomain”j|Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰Œ reftarget”Œsk_buff”uh1hh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´K`hjeubhŒ. Possible values are:”…”�”}”(hjeh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³j�h´K`hjTubj )�”}”(hhh]”(j)�”}”(hŒÜ``CHECKSUM_NONE`` Device did not checksum this packet e.g. due to lack of capabilities. The packet contains full (though not verified) checksum in packet but not in skb->csum. Thus, skb->csum is undefined in this case. ”h]”(hï)�”}”(hŒ``CHECKSUM_NONE``”h]”jq)�”}”(hj¤h]”hŒ CHECKSUM_NONE”…”�”}”(hj¦h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphj¢ubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´Kchjžubhï)�”}”(hŒÈDevice did not checksum this packet e.g. due to lack of capabilities. The packet contains full (though not verified) checksum in packet but not in skb->csum. Thus, skb->csum is undefined in this case.”h]”hŒÈDevice did not checksum this packet e.g. due to lack of capabilities. The packet contains full (though not verified) checksum in packet but not in skb->csum. Thus, skb->csum is undefined in this case.”…”�”}”(hjºh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´Kehjžubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj›ubj)�”}”(hX``CHECKSUM_UNNECESSARY`` The hardware you're dealing with doesn't calculate the full checksum (as in ``CHECKSUM_COMPLETE``), but it does parse headers and verify checksums for specific protocols. For such packets it will set ``CHECKSUM_UNNECESSARY`` if their checksums are okay. :c:type:`sk_buff.csum ` is still undefined in this case though. A driver or device must never modify the checksum field in the packet even if checksum is verified. ``CHECKSUM_UNNECESSARY`` is applicable to following protocols: - TCP: IPv6 and IPv4. - UDP: IPv4 and IPv6. A device may apply CHECKSUM_UNNECESSARY to a zero UDP checksum for either IPv4 or IPv6, the networking stack may perform further validation in this case. - GRE: only if the checksum is present in the header. - SCTP: indicates the CRC in SCTP header has been validated. - FCOE: indicates the CRC in FC frame has been validated. :c:type:`sk_buff.csum_level ` indicates the number of consecutive checksums found in the packet minus one that have been verified as ``CHECKSUM_UNNECESSARY``. For instance if a device receives an IPv6->UDP->GRE->IPv4->TCP packet and a device is able to verify the checksums for UDP (possibly zero), GRE (checksum flag is set) and TCP, :c:type:`sk_buff.csum_level ` would be set to two. If the device were only able to verify the UDP checksum and not GRE, either because it doesn't support GRE checksum or because GRE checksum is bad, skb->csum_level would be set to zero (TCP checksum is not considered in this case). ”h]”(hï)�”}”(hŒ``CHECKSUM_UNNECESSARY``”h]”jq)�”}”(hjÕh]”hŒCHECKSUM_UNNECESSARY”…”�”}”(hj×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjÓubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KihjÏubhï)�”}”(hXªThe hardware you're dealing with doesn't calculate the full checksum (as in ``CHECKSUM_COMPLETE``), but it does parse headers and verify checksums for specific protocols. For such packets it will set ``CHECKSUM_UNNECESSARY`` if their checksums are okay. :c:type:`sk_buff.csum ` is still undefined in this case though. A driver or device must never modify the checksum field in the packet even if checksum is verified.”h]”(hŒPThe hardware you’re dealing with doesn’t calculate the full checksum (as in ”…”�”}”(hjëh²hh³Nh´Nubjq)�”}”(hŒ``CHECKSUM_COMPLETE``”h]”hŒCHECKSUM_COMPLETE”…”�”}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjëubhŒg), but it does parse headers and verify checksums for specific protocols. For such packets it will set ”…”�”}”(hjëh²hh³Nh´Nubjq)�”}”(hŒ``CHECKSUM_UNNECESSARY``”h]”hŒCHECKSUM_UNNECESSARY”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjëubhŒ if their checksums are okay. ”…”�”}”(hjëh²hh³Nh´Nubh)�”}”(hŒ :c:type:`sk_buff.csum `”h]”jq)�”}”(hjh]”hŒ sk_buff.csum”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”(j{j|Œc-type”eh"]”h$]”h&]”uh1jphjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jˆŒ refdomain”j|Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰jŽŒsk_buff”uh1hh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KkhjëubhŒŒ is still undefined in this case though. A driver or device must never modify the checksum field in the packet even if checksum is verified.”…”�”}”(hjëh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³j6h´KkhjÏubhï)�”}”(hŒ>``CHECKSUM_UNNECESSARY`` is applicable to following protocols:”h]”(jq)�”}”(hŒ``CHECKSUM_UNNECESSARY``”h]”hŒCHECKSUM_UNNECESSARY”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjAubhŒ& is applicable to following protocols:”…”�”}”(hjAh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KrhjÏubhŒ block_quote”“”)�”}”(hXw- TCP: IPv6 and IPv4. - UDP: IPv4 and IPv6. A device may apply CHECKSUM_UNNECESSARY to a zero UDP checksum for either IPv4 or IPv6, the networking stack may perform further validation in this case. - GRE: only if the checksum is present in the header. - SCTP: indicates the CRC in SCTP header has been validated. - FCOE: indicates the CRC in FC frame has been validated. ”h]”j )�”}”(hhh]”(j)�”}”(hŒTCP: IPv6 and IPv4.”h]”hï)�”}”(hjih]”hŒTCP: IPv6 and IPv4.”…”�”}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´Kthjgubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjdubj)�”}”(hŒ­UDP: IPv4 and IPv6. A device may apply CHECKSUM_UNNECESSARY to a zero UDP checksum for either IPv4 or IPv6, the networking stack may perform further validation in this case.”h]”hï)�”}”(hŒ­UDP: IPv4 and IPv6. A device may apply CHECKSUM_UNNECESSARY to a zero UDP checksum for either IPv4 or IPv6, the networking stack may perform further validation in this case.”h]”hŒ­UDP: IPv4 and IPv6. A device may apply CHECKSUM_UNNECESSARY to a zero UDP checksum for either IPv4 or IPv6, the networking stack may perform further validation in this case.”…”�”}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´Kuhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjdubj)�”}”(hŒ3GRE: only if the checksum is present in the header.”h]”hï)�”}”(hjšh]”hŒ3GRE: only if the checksum is present in the header.”…”�”}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´Kxhj˜ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjdubj)�”}”(hŒ:SCTP: indicates the CRC in SCTP header has been validated.”h]”hï)�”}”(hj²h]”hŒ:SCTP: indicates the CRC in SCTP header has been validated.”…”�”}”(hj´h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´Kyhj°ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjdubj)�”}”(hŒ8FCOE: indicates the CRC in FC frame has been validated. ”h]”hï)�”}”(hŒ7FCOE: indicates the CRC in FC frame has been validated.”h]”hŒ7FCOE: indicates the CRC in FC frame has been validated.”…”�”}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KzhjÈubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjdubeh}”(h]”h ]”h"]”h$]”h&]”j_Œ-”uh1j h³jxh´Kthj`ubah}”(h]”h ]”h"]”h$]”h&]”uh1j^h³jxh´KthjÏubhï)�”}”(hX{:c:type:`sk_buff.csum_level ` indicates the number of consecutive checksums found in the packet minus one that have been verified as ``CHECKSUM_UNNECESSARY``. For instance if a device receives an IPv6->UDP->GRE->IPv4->TCP packet and a device is able to verify the checksums for UDP (possibly zero), GRE (checksum flag is set) and TCP, :c:type:`sk_buff.csum_level ` would be set to two. If the device were only able to verify the UDP checksum and not GRE, either because it doesn't support GRE checksum or because GRE checksum is bad, skb->csum_level would be set to zero (TCP checksum is not considered in this case).”h]”(h)�”}”(hŒ&:c:type:`sk_buff.csum_level `”h]”jq)�”}”(hjôh]”hŒsk_buff.csum_level”…”�”}”(hjöh²hh³Nh´Nubah}”(h]”h ]”(j{j|Œc-type”eh"]”h$]”h&]”uh1jphjòubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jˆŒ refdomain”j|Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰jŽŒsk_buff”uh1hh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´K|hjîubhŒh indicates the number of consecutive checksums found in the packet minus one that have been verified as ”…”�”}”(hjîh²hh³Nh´Nubjq)�”}”(hŒ``CHECKSUM_UNNECESSARY``”h]”hŒCHECKSUM_UNNECESSARY”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjîubhŒ². For instance if a device receives an IPv6->UDP->GRE->IPv4->TCP packet and a device is able to verify the checksums for UDP (possibly zero), GRE (checksum flag is set) and TCP, ”…”�”}”(hjîh²hh³Nh´Nubh)�”}”(hŒ&:c:type:`sk_buff.csum_level `”h]”jq)�”}”(hj*h]”hŒsk_buff.csum_level”…”�”}”(hj,h²hh³Nh´Nubah}”(h]”h ]”(j{j|Œc-type”eh"]”h$]”h&]”uh1jphj(ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jˆŒ refdomain”j|Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰jŽŒsk_buff”uh1hh³jh´K|hjîubhŒÿ would be set to two. If the device were only able to verify the UDP checksum and not GRE, either because it doesn’t support GRE checksum or because GRE checksum is bad, skb->csum_level would be set to zero (TCP checksum is not considered in this case).”…”�”}”(hjîh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³jh´K|hjÏubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj›ubj)�”}”(hXÓ``CHECKSUM_COMPLETE`` This is the most generic way. The device supplied checksum of the _whole_ packet as seen by netif_rx() and fills in :c:type:`sk_buff.csum `. This means the hardware doesn't need to parse L3/L4 headers to implement this. Notes: - Even if device supports only some protocols, but is able to produce skb->csum, it MUST use CHECKSUM_COMPLETE, not CHECKSUM_UNNECESSARY. - CHECKSUM_COMPLETE is not applicable to SCTP and FCoE protocols. ”h]”(hï)�”}”(hŒ``CHECKSUM_COMPLETE``”h]”jq)�”}”(hj]h]”hŒCHECKSUM_COMPLETE”…”�”}”(hj_h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphj[ubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´K†hjWubhï)�”}”(hŒäThis is the most generic way. The device supplied checksum of the _whole_ packet as seen by netif_rx() and fills in :c:type:`sk_buff.csum `. This means the hardware doesn't need to parse L3/L4 headers to implement this.”h]”(hŒtThis is the most generic way. The device supplied checksum of the _whole_ packet as seen by netif_rx() and fills in ”…”�”}”(hjsh²hh³Nh´Nubh)�”}”(hŒ :c:type:`sk_buff.csum `”h]”jq)�”}”(hj}h]”hŒ sk_buff.csum”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”(j{j|Œc-type”eh"]”h$]”h&]”uh1jphj{ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jˆŒ refdomain”j|Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰jŽŒsk_buff”uh1hh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KˆhjsubhŒR. This means the hardware doesn’t need to parse L3/L4 headers to implement this.”…”�”}”(hjsh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³jšh´KˆhjWubhï)�”}”(hŒNotes:”h]”hŒNotes:”…”�”}”(hj¥h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KŒhjWubj )�”}”(hhh]”(j)�”}”(hŒ‡Even if device supports only some protocols, but is able to produce skb->csum, it MUST use CHECKSUM_COMPLETE, not CHECKSUM_UNNECESSARY.”h]”hï)�”}”(hŒ‡Even if device supports only some protocols, but is able to produce skb->csum, it MUST use CHECKSUM_COMPLETE, not CHECKSUM_UNNECESSARY.”h]”hŒ‡Even if device supports only some protocols, but is able to produce skb->csum, it MUST use CHECKSUM_COMPLETE, not CHECKSUM_UNNECESSARY.”…”�”}”(hj»h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KŽhj·ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj´ubj)�”}”(hŒ@CHECKSUM_COMPLETE is not applicable to SCTP and FCoE protocols. ”h]”hï)�”}”(hŒ?CHECKSUM_COMPLETE is not applicable to SCTP and FCoE protocols.”h]”hŒ?CHECKSUM_COMPLETE is not applicable to SCTP and FCoE protocols.”…”�”}”(hjÔh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´K�hjÐubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj´ubeh}”(h]”h ]”h"]”h$]”h&]”j_jçuh1j h³jÉh´KŽhjWubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj›ubj)�”}”(hXY``CHECKSUM_PARTIAL`` A checksum is set up to be offloaded to a device as described in the output description for CHECKSUM_PARTIAL. This may occur on a packet received directly from another Linux OS, e.g., a virtualized Linux kernel on the same host, or it may be set in the input path in GRO or remote checksum offload. For the purposes of checksum verification, the checksum referred to by skb->csum_start + skb->csum_offset and any preceding checksums in the packet are considered verified. Any checksums in the packet that are after the checksum being offloaded are not considered to be verified. ”h]”(hï)�”}”(hŒ``CHECKSUM_PARTIAL``”h]”jq)�”}”(hjûh]”hŒCHECKSUM_PARTIAL”…”�”}”(hjýh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjùubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´K’hjõubhï)�”}”(hXBA checksum is set up to be offloaded to a device as described in the output description for CHECKSUM_PARTIAL. This may occur on a packet received directly from another Linux OS, e.g., a virtualized Linux kernel on the same host, or it may be set in the input path in GRO or remote checksum offload. For the purposes of checksum verification, the checksum referred to by skb->csum_start + skb->csum_offset and any preceding checksums in the packet are considered verified. Any checksums in the packet that are after the checksum being offloaded are not considered to be verified.”h]”hXBA checksum is set up to be offloaded to a device as described in the output description for CHECKSUM_PARTIAL. This may occur on a packet received directly from another Linux OS, e.g., a virtualized Linux kernel on the same host, or it may be set in the input path in GRO or remote checksum offload. For the purposes of checksum verification, the checksum referred to by skb->csum_start + skb->csum_offset and any preceding checksums in the packet are considered verified. Any checksums in the packet that are after the checksum being offloaded are not considered to be verified.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´K”hjõubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj›ubeh}”(h]”h ]”h"]”h$]”h&]”j_jçuh1j h³j¹h´KchjTubeh}”(h]”Œ*checksumming-of-received-packets-by-device”ah ]”h"]”Œ*checksumming of received packets by device”ah$]”h&]”uh1hÈhj¸h²hh³Nh´NubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ$Checksumming on transmit for non-GSO”h]”hŒ$Checksumming on transmit for non-GSO”…”�”}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj4h³Nh´Nubhï)�”}”(hŒjThe stack requests checksum offload in the :c:type:`sk_buff.ip_summed ` for a packet. Values are:”h]”(hŒ+The stack requests checksum offload in the ”…”�”}”(hjEh²hh³Nh´Nubh)�”}”(hŒ%:c:type:`sk_buff.ip_summed `”h]”jq)�”}”(hjOh]”hŒsk_buff.ip_summed”…”�”}”(hjQh²hh³Nh´Nubah}”(h]”h ]”(j{j|Œc-type”eh"]”h$]”h&]”uh1jphjMubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jˆŒ refdomain”j|Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰jŽŒsk_buff”uh1hh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´K¡hjEubhŒ for a packet. Values are:”…”�”}”(hjEh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³jlh´K¡hj4ubj )�”}”(hhh]”(j)�”}”(hXw``CHECKSUM_PARTIAL`` The driver is required to checksum the packet as seen by hard_start_xmit() from :c:type:`sk_buff.csum_start ` up to the end, and to record/write the checksum at offset :c:type:`sk_buff.csum_start ` + :c:type:`sk_buff.csum_offset `. A driver may verify that the csum_start and csum_offset values are valid values given the length and offset of the packet, but it should not attempt to validate that the checksum refers to a legitimate transport layer checksum -- it is the purview of the stack to validate that csum_start and csum_offset are set correctly. When the stack requests checksum offload for a packet, the driver MUST ensure that the checksum is set correctly. A driver can either offload the checksum calculation to the device, or call skb_checksum_help (in the case that the device does not support offload for a particular checksum). ``NETIF_F_IP_CSUM`` and ``NETIF_F_IPV6_CSUM`` are being deprecated in favor of ``NETIF_F_HW_CSUM``. New devices should use ``NETIF_F_HW_CSUM`` to indicate checksum offload capability. skb_csum_hwoffload_help() can be called to resolve ``CHECKSUM_PARTIAL`` based on network device checksumming capabilities: if a packet does not match them, skb_checksum_help() or skb_crc32c_help() (depending on the value of :c:type:`sk_buff.csum_not_inet `, see :ref:`crc`) is called to resolve the checksum. ”h]”(hï)�”}”(hŒ``CHECKSUM_PARTIAL``”h]”jq)�”}”(hj€h]”hŒCHECKSUM_PARTIAL”…”�”}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphj~ubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´K¤hjzubhï)�”}”(hXFThe driver is required to checksum the packet as seen by hard_start_xmit() from :c:type:`sk_buff.csum_start ` up to the end, and to record/write the checksum at offset :c:type:`sk_buff.csum_start ` + :c:type:`sk_buff.csum_offset `. A driver may verify that the csum_start and csum_offset values are valid values given the length and offset of the packet, but it should not attempt to validate that the checksum refers to a legitimate transport layer checksum -- it is the purview of the stack to validate that csum_start and csum_offset are set correctly.”h]”(hŒPThe driver is required to checksum the packet as seen by hard_start_xmit() from ”…”�”}”(hj–h²hh³Nh´Nubh)�”}”(hŒ&:c:type:`sk_buff.csum_start `”h]”jq)�”}”(hj h]”hŒsk_buff.csum_start”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”(j{j|Œc-type”eh"]”h$]”h&]”uh1jphjžubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jˆŒ refdomain”j|Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰jŽŒsk_buff”uh1hh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´K¦hj–ubhŒ; up to the end, and to record/write the checksum at offset ”…”�”}”(hj–h²hh³Nh´Nubh)�”}”(hŒ&:c:type:`sk_buff.csum_start `”h]”jq)�”}”(hjÄh]”hŒsk_buff.csum_start”…”�”}”(hjÆh²hh³Nh´Nubah}”(h]”h ]”(j{j|Œc-type”eh"]”h$]”h&]”uh1jphjÂubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jˆŒ refdomain”j|Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰jŽŒsk_buff”uh1hh³j½h´K¦hj–ubhŒ + ”…”�”}”(hj–h²hh³Nh´Nubh)�”}”(hŒ':c:type:`sk_buff.csum_offset `”h]”jq)�”}”(hjçh]”hŒsk_buff.csum_offset”…”�”}”(hjéh²hh³Nh´Nubah}”(h]”h ]”(j{j|Œc-type”eh"]”h$]”h&]”uh1jphjåubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jˆŒ refdomain”j|Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰jŽŒsk_buff”uh1hh³j½h´K¦hj–ubhXE. A driver may verify that the csum_start and csum_offset values are valid values given the length and offset of the packet, but it should not attempt to validate that the checksum refers to a legitimate transport layer checksum -- it is the purview of the stack to validate that csum_start and csum_offset are set correctly.”…”�”}”(hj–h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³j½h´K¦hjzubhï)�”}”(hX!When the stack requests checksum offload for a packet, the driver MUST ensure that the checksum is set correctly. A driver can either offload the checksum calculation to the device, or call skb_checksum_help (in the case that the device does not support offload for a particular checksum).”h]”hX!When the stack requests checksum offload for a packet, the driver MUST ensure that the checksum is set correctly. A driver can either offload the checksum calculation to the device, or call skb_checksum_help (in the case that the device does not support offload for a particular checksum).”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´K°hjzubhï)�”}”(hXõ``NETIF_F_IP_CSUM`` and ``NETIF_F_IPV6_CSUM`` are being deprecated in favor of ``NETIF_F_HW_CSUM``. New devices should use ``NETIF_F_HW_CSUM`` to indicate checksum offload capability. skb_csum_hwoffload_help() can be called to resolve ``CHECKSUM_PARTIAL`` based on network device checksumming capabilities: if a packet does not match them, skb_checksum_help() or skb_crc32c_help() (depending on the value of :c:type:`sk_buff.csum_not_inet `, see :ref:`crc`) is called to resolve the checksum.”h]”(jq)�”}”(hŒ``NETIF_F_IP_CSUM``”h]”hŒNETIF_F_IP_CSUM”…”�”}”(hj! h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphj ubhŒ and ”…”�”}”(hj h²hh³Nh´Nubjq)�”}”(hŒ``NETIF_F_IPV6_CSUM``”h]”hŒNETIF_F_IPV6_CSUM”…”�”}”(hj3 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphj ubhŒ" are being deprecated in favor of ”…”�”}”(hj h²hh³Nh´Nubjq)�”}”(hŒ``NETIF_F_HW_CSUM``”h]”hŒNETIF_F_HW_CSUM”…”�”}”(hjE h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphj ubhŒ. New devices should use ”…”�”}”(hj h²hh³Nh´Nubjq)�”}”(hŒ``NETIF_F_HW_CSUM``”h]”hŒNETIF_F_HW_CSUM”…”�”}”(hjW h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphj ubhŒ] to indicate checksum offload capability. skb_csum_hwoffload_help() can be called to resolve ”…”�”}”(hj h²hh³Nh´Nubjq)�”}”(hŒ``CHECKSUM_PARTIAL``”h]”hŒCHECKSUM_PARTIAL”…”�”}”(hji h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphj ubhŒ™ based on network device checksumming capabilities: if a packet does not match them, skb_checksum_help() or skb_crc32c_help() (depending on the value of ”…”�”}”(hj h²hh³Nh´Nubh)�”}”(hŒ):c:type:`sk_buff.csum_not_inet `”h]”jq)�”}”(hj} h]”hŒsk_buff.csum_not_inet”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”(j{j|Œc-type”eh"]”h$]”h&]”uh1jphj{ ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jˆŒ refdomain”j|Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰jŽŒsk_buff”uh1hh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´Kµhj ubhŒ, see ”…”�”}”(hj h²hh³Nh´Nubh)�”}”(hŒ :ref:`crc`”h]”hŒinline”“”)�”}”(hj¡ h]”hŒcrc”…”�”}”(hj¥ h²hh³Nh´Nubah}”(h]”h ]”(j{Œstd”Œstd-ref”eh"]”h$]”h&]”uh1j£ hjŸ ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jˆŒ refdomain”j¯ Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆjŽŒcrc”uh1hh³jš h´Kµhj ubhŒ$) is called to resolve the checksum.”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³jš h´Kµhjzubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjwubj)�”}”(hŒc``CHECKSUM_NONE`` The skb was already checksummed by the protocol, or a checksum is not required. ”h]”(hï)�”}”(hŒ``CHECKSUM_NONE``”h]”jq)�”}”(hj× h]”hŒ CHECKSUM_NONE”…”�”}”(hjÙ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjÕ ubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´K¾hjÑ ubhï)�”}”(hŒOThe skb was already checksummed by the protocol, or a checksum is not required.”h]”hŒOThe skb was already checksummed by the protocol, or a checksum is not required.”…”�”}”(hjí h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KÀhjÑ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjwubj)�”}”(hŒe``CHECKSUM_UNNECESSARY`` This has the same meaning as CHECKSUM_NONE for checksum offload on output. ”h]”(hï)�”}”(hŒ``CHECKSUM_UNNECESSARY``”h]”jq)�”}”(hj h]”hŒCHECKSUM_UNNECESSARY”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphj ubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KÃhj ubhï)�”}”(hŒJThis has the same meaning as CHECKSUM_NONE for checksum offload on output.”h]”hŒJThis has the same meaning as CHECKSUM_NONE for checksum offload on output.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KÅhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjwubj)�”}”(hŒ®``CHECKSUM_COMPLETE`` Not used in checksum output. If a driver observes a packet with this value set in skbuff, it should treat the packet as if ``CHECKSUM_NONE`` were set. ”h]”(hï)�”}”(hŒ``CHECKSUM_COMPLETE``”h]”jq)�”}”(hj9 h]”hŒCHECKSUM_COMPLETE”…”�”}”(hj; h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphj7 ubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KÈhj3 ubhï)�”}”(hŒ–Not used in checksum output. If a driver observes a packet with this value set in skbuff, it should treat the packet as if ``CHECKSUM_NONE`` were set.”h]”(hŒ{Not used in checksum output. If a driver observes a packet with this value set in skbuff, it should treat the packet as if ”…”�”}”(hjO h²hh³Nh´Nubjq)�”}”(hŒ``CHECKSUM_NONE``”h]”hŒ CHECKSUM_NONE”…”�”}”(hjW h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjO ubhŒ were set.”…”�”}”(hjO h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KÊhj3 ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjwubeh}”(h]”h ]”h"]”h$]”h&]”j_jçuh1j h³j•h´K¤hj4ubhŒtarget”“”)�”}”(hŒ.. _crc:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œcrc”uh1j| h´K¢hj4ubeh}”(h]”Œ$checksumming-on-transmit-for-non-gso”ah ]”h"]”Œ$checksumming on transmit for non-gso”ah$]”h&]”uh1hÈhj¸h²hh³Nh´NubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒNon-IP checksum (CRC) offloads”h]”hŒNon-IP checksum (CRC) offloads”…”�”}”(hj• h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj’ h³Nh´Nubjù)�”}”(hhh]”j )�”}”(hhh]”(j)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jhj¦ ubj)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K uh1jhj¦ ubj()�”}”(hhh]”(j-)�”}”(hhh]”(j2)�”}”(hhh]”hï)�”}”(hŒ``NETIF_F_SCTP_CRC``”h]”jq)�”}”(hjÈ h]”hŒNETIF_F_SCTP_CRC”…”�”}”(hjÊ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjÆ ubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KÕhjà ubah}”(h]”h ]”h"]”h$]”h&]”uh1j1hjÀ ubj2)�”}”(hhh]”hï)�”}”(hXoThis feature indicates that a device is capable of offloading the SCTP CRC in a packet. To perform this offload the stack will set csum_start and csum_offset accordingly, set ip_summed to ``CHECKSUM_PARTIAL`` and set csum_not_inet to 1, to provide an indication in the skbuff that the ``CHECKSUM_PARTIAL`` refers to CRC32c. A driver that supports both IP checksum offload and SCTP CRC32c offload must verify which offload is configured for a packet by testing the value of :c:type:`sk_buff.csum_not_inet `; skb_crc32c_csum_help() is provided to resolve ``CHECKSUM_PARTIAL`` on skbs where csum_not_inet is set to 1.”h]”(hŒ¼This feature indicates that a device is capable of offloading the SCTP CRC in a packet. To perform this offload the stack will set csum_start and csum_offset accordingly, set ip_summed to ”…”�”}”(hjç h²hh³Nh´Nubjq)�”}”(hŒ``CHECKSUM_PARTIAL``”h]”hŒCHECKSUM_PARTIAL”…”�”}”(hjï h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjç ubhŒM and set csum_not_inet to 1, to provide an indication in the skbuff that the ”…”�”}”(hjç h²hh³Nh´Nubjq)�”}”(hŒ``CHECKSUM_PARTIAL``”h]”hŒCHECKSUM_PARTIAL”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjç ubhŒ¨ refers to CRC32c. A driver that supports both IP checksum offload and SCTP CRC32c offload must verify which offload is configured for a packet by testing the value of ”…”�”}”(hjç h²hh³Nh´Nubh)�”}”(hŒ):c:type:`sk_buff.csum_not_inet `”h]”jq)�”}”(hj h]”hŒsk_buff.csum_not_inet”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”(j{j|Œc-type”eh"]”h$]”h&]”uh1jphj ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jˆŒ refdomain”j|Œreftype”Œtype”Œ refexplicit”ˆŒrefwarn”‰jŽŒsk_buff”uh1hh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´KÖhjç ubhŒ0; skb_crc32c_csum_help() is provided to resolve ”…”�”}”(hjç h²hh³Nh´Nubjq)�”}”(hŒ``CHECKSUM_PARTIAL``”h]”hŒCHECKSUM_PARTIAL”…”�”}”(hj7 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjç ubhŒ) on skbs where csum_not_inet is set to 1.”…”�”}”(hjç h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³j2 h´KÖhjä ubah}”(h]”h ]”h"]”h$]”h&]”uh1j1hjÀ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j,hj½ ubj-)�”}”(hhh]”(j2)�”}”(hhh]”hï)�”}”(hŒ``NETIF_F_FCOE_CRC``”h]”jq)�”}”(hjc h]”hŒNETIF_F_FCOE_CRC”…”�”}”(hje h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphja ubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´Kàhj^ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j1hj[ ubj2)�”}”(hhh]”hï)�”}”(hXäThis feature indicates that a device is capable of offloading the FCOE CRC in a packet. To perform this offload the stack will set ip_summed to ``CHECKSUM_PARTIAL`` and set csum_start and csum_offset accordingly. Note that there is no indication in the skbuff that the ``CHECKSUM_PARTIAL`` refers to an FCOE checksum, so a driver that supports both IP checksum offload and FCOE CRC offload must verify which offload is configured for a packet, presumably by inspecting packet headers.”h]”(hŒ�This feature indicates that a device is capable of offloading the FCOE CRC in a packet. To perform this offload the stack will set ip_summed to ”…”�”}”(hj‚ h²hh³Nh´Nubjq)�”}”(hŒ``CHECKSUM_PARTIAL``”h]”hŒCHECKSUM_PARTIAL”…”�”}”(hjŠ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphj‚ ubhŒi and set csum_start and csum_offset accordingly. Note that there is no indication in the skbuff that the ”…”�”}”(hj‚ h²hh³Nh´Nubjq)�”}”(hŒ``CHECKSUM_PARTIAL``”h]”hŒCHECKSUM_PARTIAL”…”�”}”(hjœ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphj‚ ubhŒÃ refers to an FCOE checksum, so a driver that supports both IP checksum offload and FCOE CRC offload must verify which offload is configured for a packet, presumably by inspecting packet headers.”…”�”}”(hj‚ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´Káhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j1hj[ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j,hj½ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j'hj¦ ubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j hj£ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jøhj’ ubeh}”(h]”(Œnon-ip-checksum-crc-offloads”j‰ eh ]”h"]”(Œnon-ip checksum (crc) offloads”Œcrc”eh$]”h&]”uh1hÈhj¸h²hh³Nh´NŒexpect_referenced_by_name”}”jÚ j~ sŒexpect_referenced_by_id”}”j‰ j~ subhÉ)�”}”(hhh]”(hÎ)�”}”(hŒChecksumming on output with GSO”h]”hŒChecksumming on output with GSO”…”�”}”(hjä h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjá h³Nh´Nubhï)�”}”(hXìIn the case of a GSO packet (skb_is_gso() is true), checksum offload is implied by the SKB_GSO_* flags in gso_type. Most obviously, if the gso_type is ``SKB_GSO_TCPV4`` or ``SKB_GSO_TCPV6``, TCP checksum offload as part of the GSO operation is implied. If a checksum is being offloaded with GSO then ip_summed is ``CHECKSUM_PARTIAL``, and both csum_start and csum_offset are set to refer to the outermost checksum being offloaded (two offloaded checksums are possible with UDP encapsulation).”h]”(hŒ—In the case of a GSO packet (skb_is_gso() is true), checksum offload is implied by the SKB_GSO_* flags in gso_type. Most obviously, if the gso_type is ”…”�”}”(hjò h²hh³Nh´Nubjq)�”}”(hŒ``SKB_GSO_TCPV4``”h]”hŒ SKB_GSO_TCPV4”…”�”}”(hjú h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjò ubhŒ or ”…”�”}”(hjò h²hh³Nh´Nubjq)�”}”(hŒ``SKB_GSO_TCPV6``”h]”hŒ SKB_GSO_TCPV6”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjò ubhŒ|, TCP checksum offload as part of the GSO operation is implied. If a checksum is being offloaded with GSO then ip_summed is ”…”�”}”(hjò h²hh³Nh´Nubjq)�”}”(hŒ``CHECKSUM_PARTIAL``”h]”hŒCHECKSUM_PARTIAL”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjò ubhŒŸ, and both csum_start and csum_offset are set to refer to the outermost checksum being offloaded (two offloaded checksums are possible with UDP encapsulation).”…”�”}”(hjò h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³Œd/var/lib/git/docbuild/linux/Documentation/networking/checksum-offloads:157: ./include/linux/skbuff.h”h´Kìhjá ubeh}”(h]”Œchecksumming-on-output-with-gso”ah ]”h"]”Œchecksumming on output with gso”ah$]”h&]”uh1hÈhj¸h²hh³Nh´Nubeh}”(h]”Œskb-checksum-documentation”ah ]”h"]”Œskb checksum documentation”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K›ubeh}”(h]”Œchecksum-offloads”ah ]”h"]”Œchecksum 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”j1Œ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”jq Œ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”}”j‰ ]”j~ asŒnameids”}”(jL jI j•j’jjjµj²jFjCjµj²jD jA jQjNj1j.j� jŒ jÚ j‰ jÙ jÖ j< j9 uŒ nametypes”}”(jL ‰j•‰j‰jµ‰jF‰jµ‰jD ‰jQ‰j1‰j� ‰jÚ ˆjÙ ‰j< ‰uh}”(jI hÊj’hÝjj˜j²j!jCj¸j²jIjA j¸jNjØj.jTjŒ j4j‰ j’ jÖ j’ j9 já jGjú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”“”}”j Ks…”R”Œparse_messages”]”Œtransform_messages”]”hŒsystem_message”“”)�”}”(hhh]”hï)�”}”(hhh]”hŒ)Hyperlink target "crc" is not referenced.”…”�”}”hjÛ sbah}”(h]”h ]”h"]”h$]”h&]”uh1hîhjØ ubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œline”K¢Œsource”hÇuh1jÖ ubaŒ transformer”NŒ include_log”]”Œ decoration”Nh²hub.