* [PATCH net] net: do not delay zero-copy skbs in skb_attempt_defer_free()
@ 2026-02-16 19:36 Eric Dumazet
2026-02-16 23:52 ` Jason Xing
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Eric Dumazet @ 2026-02-16 19:36 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, Kuniyuki Iwashima, Willem de Bruijn, netdev,
eric.dumazet, Eric Dumazet
After the blamed commit, TCP tx zero copy notifications could be
arbitrarily delayed and cause regressions in applications waiting
for them.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: e20dfbad8aab ("net: fix napi_consume_skb() with alien skbs")
---
net/core/skbuff.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 699c401a5eae9c497a42b6bdd8593af7890529f4..dc47d3efc72ed86dce5e382d505eda7bc863669a 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -7266,10 +7266,15 @@ void skb_attempt_defer_free(struct sk_buff *skb)
{
struct skb_defer_node *sdn;
unsigned long defer_count;
- int cpu = skb->alloc_cpu;
unsigned int defer_max;
bool kick;
+ int cpu;
+ /* zero copy notifications should not be delayed. */
+ if (skb_zcopy(skb))
+ goto nodefer;
+
+ cpu = skb->alloc_cpu;
if (cpu == raw_smp_processor_id() ||
WARN_ON_ONCE(cpu >= nr_cpu_ids) ||
!cpu_online(cpu)) {
--
2.53.0.310.g728cabbaf7-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net] net: do not delay zero-copy skbs in skb_attempt_defer_free()
2026-02-16 19:36 [PATCH net] net: do not delay zero-copy skbs in skb_attempt_defer_free() Eric Dumazet
@ 2026-02-16 23:52 ` Jason Xing
2026-02-17 14:17 ` Willem de Bruijn
2026-02-18 1:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Jason Xing @ 2026-02-16 23:52 UTC (permalink / raw)
To: Eric Dumazet
Cc: David S . Miller, Jakub Kicinski, Paolo Abeni, Simon Horman,
Kuniyuki Iwashima, Willem de Bruijn, netdev, eric.dumazet
On Tue, Feb 17, 2026 at 3:37 AM Eric Dumazet <edumazet@google.com> wrote:
>
> After the blamed commit, TCP tx zero copy notifications could be
> arbitrarily delayed and cause regressions in applications waiting
> for them.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Fixes: e20dfbad8aab ("net: fix napi_consume_skb() with alien skbs")
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net] net: do not delay zero-copy skbs in skb_attempt_defer_free()
2026-02-16 19:36 [PATCH net] net: do not delay zero-copy skbs in skb_attempt_defer_free() Eric Dumazet
2026-02-16 23:52 ` Jason Xing
@ 2026-02-17 14:17 ` Willem de Bruijn
2026-02-18 1:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Willem de Bruijn @ 2026-02-17 14:17 UTC (permalink / raw)
To: Eric Dumazet, David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, Kuniyuki Iwashima, Willem de Bruijn, netdev,
eric.dumazet, Eric Dumazet
Eric Dumazet wrote:
> After the blamed commit, TCP tx zero copy notifications could be
> arbitrarily delayed and cause regressions in applications waiting
> for them.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Fixes: e20dfbad8aab ("net: fix napi_consume_skb() with alien skbs")
Reviewed-by: Willem de Bruijn <willemb@google.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net] net: do not delay zero-copy skbs in skb_attempt_defer_free()
2026-02-16 19:36 [PATCH net] net: do not delay zero-copy skbs in skb_attempt_defer_free() Eric Dumazet
2026-02-16 23:52 ` Jason Xing
2026-02-17 14:17 ` Willem de Bruijn
@ 2026-02-18 1:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-02-18 1:20 UTC (permalink / raw)
To: Eric Dumazet
Cc: davem, kuba, pabeni, horms, kuniyu, willemb, netdev, eric.dumazet
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 16 Feb 2026 19:36:53 +0000 you wrote:
> After the blamed commit, TCP tx zero copy notifications could be
> arbitrarily delayed and cause regressions in applications waiting
> for them.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Fixes: e20dfbad8aab ("net: fix napi_consume_skb() with alien skbs")
>
> [...]
Here is the summary with links:
- [net] net: do not delay zero-copy skbs in skb_attempt_defer_free()
https://git.kernel.org/netdev/net/c/0943404b1f3b
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] 4+ messages in thread
end of thread, other threads:[~2026-02-18 1:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-16 19:36 [PATCH net] net: do not delay zero-copy skbs in skb_attempt_defer_free() Eric Dumazet
2026-02-16 23:52 ` Jason Xing
2026-02-17 14:17 ` Willem de Bruijn
2026-02-18 1:20 ` 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