]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tcp: move sk_forced_mem_schedule() to tcp.c
authorEric Dumazet <edumazet@google.com>
Fri, 23 Jan 2026 11:16:05 +0000 (11:16 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 27 Jan 2026 13:58:13 +0000 (14:58 +0100)
commita18056a6c11cab562a77d16b5931f6fdf55e7ec9
tree930875315fd7405afa0ab3578cfe3e9880c92e75
parent4778a04c1574babd8a79561d60cd5e243585ffaa
tcp: move sk_forced_mem_schedule() to tcp.c

TCP fast path can (auto)inline this helper, instead
of (auto)inling it from tcp_send_fin().

No change of overall code size, but tcp_sendmsg() is faster.

$ scripts/bloat-o-meter -t vmlinux.old vmlinux.new
add/remove: 0/0 grow/shrink: 1/1 up/down: 141/-140 (1)
Function                                     old     new   delta
tcp_stream_alloc_skb                         216     357    +141
tcp_send_fin                                 688     548    -140
Total: Before=22236729, After=22236730, chg +0.00%

BTW, we might change tcp_send_fin() to use tcp_stream_alloc_skb().

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Link: https://patch.msgid.link/20260123111605.4089200-1-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/ipv4/tcp.c
net/ipv4/tcp_output.c