]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
udp: move udp6_csum_init() back to net/ipv6/udp.c
authorEric Dumazet <edumazet@google.com>
Mon, 23 Feb 2026 09:34:45 +0000 (09:34 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 25 Feb 2026 00:30:40 +0000 (16:30 -0800)
commitf033335937d6f72a13bb38d82422eef30da31972
tree9ce8fb6ca85f6adfde9c11b1835ecc55c5a4a9c9
parent2550def53bbf2323894265e0e64363998bf9e5c3
udp: move udp6_csum_init() back to net/ipv6/udp.c

This function has a single caller in net/ipv6/udp.c.

Move it there so that the compiler can decide to (auto)inline
it if he prefers to. IBT glue is removed anyway.

With clang, we can see it was able to inline it and also
inlined one other helper at the same time.

UDPLITE removal will also help.

$ scripts/bloat-o-meter -t vmlinux.old vmlinux.new
add/remove: 0/2 grow/shrink: 1/0 up/down: 840/-785 (55)
Function                                     old     new   delta
__udp6_lib_rcv                              1247    2087    +840
__pfx_udp6_csum_init                          16       -     -16
udp6_csum_init                               769       -    -769
Total: Before=25074399, After=25074454, chg +0.00%

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260223093445.3696368-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/ip6_checksum.h
net/ipv6/ip6_checksum.c
net/ipv6/udp.c