tcp: use __skb_push() in __tcp_transmit_skb()

We trust MAX_TCP_HEADER to be large enough.

Using the inlined version of skb_push() trades 8 bytes
of text for better performance of TCP TX fast path.

$ scripts/bloat-o-meter -t vmlinux.old vmlinux.new
add/remove: 0/0 grow/shrink: 1/0 up/down: 8/0 (8)
Function                                     old     new   delta
__tcp_transmit_skb                          3181    3189      +8
Total: Before=24896035, After=24896043, chg +0.00%

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260203044226.3489941-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Eric Dumazet 2026-02-03 04:42:26 +00:00 committed by Jakub Kicinski
parent 333225e1e9
commit 59b5e7f47c

View file

@ -1573,7 +1573,7 @@ static int __tcp_transmit_skb(struct sock *sk, struct sk_buff *skb,
*/
skb->pfmemalloc = 0;
skb_push(skb, tcp_header_size);
__skb_push(skb, tcp_header_size);
skb_reset_transport_header(skb);
skb_orphan(skb);