]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tcp: move tcp_rack_advance() to tcp_input.c
authorEric Dumazet <edumazet@google.com>
Tue, 27 Jan 2026 03:21:47 +0000 (03:21 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 29 Jan 2026 03:31:51 +0000 (19:31 -0800)
commitd5fb143dbe8d3050c9abcd390d65928e2a3e646e
tree8f3a5edf410b972bd49b4d8da765cbbc328c1fb1
parent629a68865abb40c120e3f6498b26a35c40590ea0
tcp: move tcp_rack_advance() to tcp_input.c

tcp_rack_advance() is called from tcp_ack() and tcp_sacktag_one().

Moving it to tcp_input.c allows the compiler to inline it and save
both space and cpu cycles in TCP fast path.

$ scripts/bloat-o-meter -t vmlinux.1 vmlinux.2
add/remove: 0/2 grow/shrink: 1/1 up/down: 98/-132 (-34)
Function                                     old     new   delta
tcp_ack                                     5741    5839     +98
tcp_sacktag_one                              407     395     -12
__pfx_tcp_rack_advance                        16       -     -16
tcp_rack_advance                             104       -    -104
Total: Before=22572680, After=22572646, chg -0.00%

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260127032147.3498272-4-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/tcp.h
net/ipv4/tcp_input.c
net/ipv4/tcp_recovery.c