public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] tcp: use __skb_push() in __tcp_transmit_skb()
@ 2026-02-03  4:42 Eric Dumazet
  2026-02-04  0:25 ` Kuniyuki Iwashima
  2026-02-05  4:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2026-02-03  4:42 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Neal Cardwell, Kuniyuki Iwashima, netdev,
	eric.dumazet, Eric Dumazet

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>
---
 net/ipv4/tcp_output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 597e888af36d..f907f24f74f7 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -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);
-- 
2.53.0.rc1.225.gd81095ad13-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] tcp: use __skb_push() in __tcp_transmit_skb()
  2026-02-03  4:42 [PATCH net-next] tcp: use __skb_push() in __tcp_transmit_skb() Eric Dumazet
@ 2026-02-04  0:25 ` Kuniyuki Iwashima
  2026-02-05  4:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Kuniyuki Iwashima @ 2026-02-04  0:25 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: David S . Miller, Jakub Kicinski, Paolo Abeni, Simon Horman,
	Neal Cardwell, netdev, eric.dumazet

On Mon, Feb 2, 2026 at 8:42 PM Eric Dumazet <edumazet@google.com> wrote:
>
> 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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] tcp: use __skb_push() in __tcp_transmit_skb()
  2026-02-03  4:42 [PATCH net-next] tcp: use __skb_push() in __tcp_transmit_skb() Eric Dumazet
  2026-02-04  0:25 ` Kuniyuki Iwashima
@ 2026-02-05  4:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-02-05  4:50 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: davem, kuba, pabeni, horms, ncardwell, kuniyu, netdev,
	eric.dumazet

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue,  3 Feb 2026 04:42:26 +0000 you wrote:
> 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%
> 
> [...]

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-02-05  4:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-03  4:42 [PATCH net-next] tcp: use __skb_push() in __tcp_transmit_skb() Eric Dumazet
2026-02-04  0:25 ` Kuniyuki Iwashima
2026-02-05  4:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox