aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
authorJakub Kicinski <kuba@kernel.org>2026-05-26 09:01:49 -0700
committerJakub Kicinski <kuba@kernel.org>2026-05-28 14:37:47 -0700
commit6686e7f03f42c9476770e06e0a030b7267018e71 (patch)
tree22abe3148c61e93230f799d3d1e301d4e84c1d6f /Documentation
parentf94874c38886b4e1adbd3233a313f320966d30ff (diff)
downloadlinux-next-history-6686e7f03f42c9476770e06e0a030b7267018e71.tar.gz
docs: net: add Rx notes to the checksum guide
The Rx checksum processing gives people pause. The two main questions in my experience are: - what to do with bad IPv4 checksum; and - what to do with packets with bad checksum. Folks often feel the urge to drop the latter, to "avoid overloading the host". Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20260526160151.2793354-9-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/networking/checksum-offloads.rst17
1 files changed, 16 insertions, 1 deletions
diff --git a/Documentation/networking/checksum-offloads.rst b/Documentation/networking/checksum-offloads.rst
index 907aed9f3a3b8..d838fe5c16066 100644
--- a/Documentation/networking/checksum-offloads.rst
+++ b/Documentation/networking/checksum-offloads.rst
@@ -19,7 +19,6 @@ The following technologies are described:
Things that should be documented here but aren't yet:
-* RX Checksum Offload
* CHECKSUM_UNNECESSARY conversion
@@ -139,3 +138,19 @@ 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.
+
+
+RX Checksum Offload
+===================
+
+RX 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.
+
+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.