]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
udp: refine __udp_enqueue_schedule_skb() test
authorEric Dumazet <edumazet@google.com>
Tue, 16 Sep 2025 16:09:46 +0000 (16:09 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 18 Sep 2025 08:17:10 +0000 (10:17 +0200)
commit9aaec660b5be29f23aaa7d1b0ae426b895dc0ca5
tree8a1dc03b8cdf6bd614cd88d5a7f92abdc83b0362
parentb76543b21fbcfbb96332fd80cc0d85bbcd72d8f0
udp: refine __udp_enqueue_schedule_skb() test

Commit 5a465a0da13e ("udp: Fix multiple wraparounds
of sk->sk_rmem_alloc.") allowed to slightly overshoot
sk->sk_rmem_alloc, when many cpus are trying
to feed packets to a common UDP socket.

This patch, combined with the following one reduces
false sharing on the victim socket under DDOS.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20250916160951.541279-6-edumazet@google.com
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/ipv4/udp.c