]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
udp: Remove partial csum code in RX.
authorKuniyuki Iwashima <kuniyu@google.com>
Wed, 11 Mar 2026 05:19:54 +0000 (05:19 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 14 Mar 2026 01:57:45 +0000 (18:57 -0700)
commitc2539d4f2df7a9889b71bad97b97ddfd9e47add1
tree4c49627bbc1faef3f1c4ac915e6c9de9d188563a
parentb972cb5d397e0e9575d953a6c6b983c708de0326
udp: Remove partial csum code in RX.

UDP-Lite supports the partial checksum and the coverage is
stored in the position of the length field of struct udphdr.

In RX paths, udp4_csum_init() / udp6_csum_init() save the value
in UDP_SKB_CB(skb)->cscov and set UDP_SKB_CB(skb)->partial_cov
to 1 if the coverage is not full.

The subsequent processing diverges depending on the value,
but such paths are now dead.

Also, these functions have some code guarded for UDP:

  * udp_unicast_rcv_skb / udp6_unicast_rcv_skb
  * __udp4_lib_rcv() and __udp6_lib_rcv().

Let's remove the partial csum code and the unnecessary
guard for UDP-Lite in RX.

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20260311052020.1213705-8-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/udp.h
include/net/udplite.h
net/ipv4/udp.c
net/ipv6/udp.c