tcp: use __skb_push() in __tcp_transmit_skb()
Subsystems (3)
PATCH 1/1 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 <[email protected]>
--- net/ipv4/tcp_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/tcp_output.c +1 -1
@@ -1565,7 +1565,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);
Signature · 1 line
2.53.0.rc1.225.gd81095ad13-goog
Quoted 6 lines · Eric Dumazet
We trust
MAX_TCP_HEADERto be large enough.Using the inlined version of
skb_push()trades 8 bytes of text for better performance of TCP TX fast path.
Quoted 7 lines
$ 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 <[email protected]>
Reviewed-by Kuniyuki Iwashima <[email protected]>
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 5 lines · On Tue, 3 Feb 2026 04:42:26 +0000 you wrote:
We trust
MAX_TCP_HEADERto be large enough.Using the inlined version of
skb_push()trades 8 bytes of text for better performance of TCP TX fast path.
Quoted 7 lines
$ 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%[...]
Here is the summary with links:
- [net-next] tcp: use __skb_push() in __tcp_transmit_skb()
https://git.kernel.org/netdev/net-next/c/59b5e7f47c7c
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html