]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tcp: move tcp_rate_gen to tcp_input.c
authorEric Dumazet <edumazet@google.com>
Wed, 21 Jan 2026 09:59:22 +0000 (09:59 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 23 Jan 2026 02:28:48 +0000 (18:28 -0800)
commitb814bdcecd7990d85d42e19cff6ce0c12f146330
treee5dada62a5bded70eb784cc0654abf4976ae98cf
parent3b87882bb399bf6d1900a1c2cc8dde65d336680a
tcp: move tcp_rate_gen to tcp_input.c

This function is called from one caller only, in TCP fast path.

Move it to tcp_input.c so that compiler can inline it.

$ scripts/bloat-o-meter -t vmlinux.old vmlinux.new
add/remove: 0/2 grow/shrink: 1/0 up/down: 226/-300 (-74)
Function                                     old     new   delta
tcp_ack                                     5405    5631    +226
__pfx_tcp_rate_gen                            16       -     -16
tcp_rate_gen                                 284       -    -284
Total: Before=22566536, After=22566462, chg -0.00%

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Link: https://patch.msgid.link/20260121095923.3134639-2-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