]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tcp: move tcp_rate_skb_delivered() to tcp_input.c
authorEric Dumazet <edumazet@google.com>
Sun, 18 Jan 2026 12:32:04 +0000 (12:32 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 21 Jan 2026 03:03:09 +0000 (19:03 -0800)
commit670ade3bfae6f8a06213b65be3435b445c11c36d
tree0e432025306c0c9df693fcc1d27194039022fd39
parent2d265e2fe6f2d6370003db99c96eaff2dd1b7e43
tcp: move tcp_rate_skb_delivered() to tcp_input.c

tcp_rate_skb_delivered() is only called from tcp_input.c.
Move it there and make it static.

Both gcc and clang are (auto)inlining it, TCP performance
is increased at a small space cost.

$ scripts/bloat-o-meter -t vmlinux.old vmlinux.new
add/remove: 0/2 grow/shrink: 3/0 up/down: 509/-187 (322)
Function                                     old     new   delta
tcp_sacktag_walk                            1682    1867    +185
tcp_ack                                     5230    5405    +175
tcp_shifted_skb                              437     586    +149
__pfx_tcp_rate_skb_delivered                  16       -     -16
tcp_rate_skb_delivered                       171       -    -171
Total: Before=22566192, After=22566514, chg +0.00%

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Link: https://patch.msgid.link/20260118123204.2315993-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/tcp.h
net/ipv4/tcp_input.c
net/ipv4/tcp_rate.c