]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tcp: move tcp_rbtree_insert() to tcp_output.c
authorEric Dumazet <edumazet@google.com>
Tue, 3 Feb 2026 04:51:10 +0000 (04:51 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 Feb 2026 04:36:50 +0000 (20:36 -0800)
commit7c1db78ff75f936e566f23af0e38ee4568a6af6b
treef7d6ff9dd7c4e73308a8d3ceba878c8ae1be5ea1
parent59b5e7f47c7c956a5e88a00953f351b4fbfa360d
tcp: move tcp_rbtree_insert() to tcp_output.c

tcp_rbtree_insert() is primarily used from tcp_output.c
In tcp_input.c, only (slow path) tcp_collapse() uses it.

Move it to tcp_output.c to allow its (auto)inlining to improve
TCP tx fast path.

$ scripts/bloat-o-meter -t vmlinux.old vmlinux.new
add/remove: 0/0 grow/shrink: 4/1 up/down: 445/-115 (330)
Function                                     old     new   delta
tcp_connect                                 4277    4478    +201
tcp_event_new_data_sent                      162     248     +86
tcp_send_synack                              780     862     +82
tcp_fragment                                1185    1261     +76
tcp_collapse                                1524    1409    -115
Total: Before=24896043, After=24896373, chg +0.00%

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260203045110.3499713-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp_input.c
net/ipv4/tcp_output.c