udp: increase RX performance under stress
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 All 10 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | ipv6: make ipv6_pinfo.saddr_cache a booleaninclude/ include/ net/ +4 more | +12 | 3 replies | Applied |
| 2/10 | ipv6: make ipv6_pinfo.daddr_cache a booleaninclude/ include/ net/ +4 more | +10 | 3 replies | Applied |
| 3/10 | ipv6: np->rxpmtu race annotationnet/ net/ | +2 | 3 replies | Applied |
| 4/10 | ipv6: reorganise struct ipv6_pinfoinclude/ | +16 | 3 replies | Applied |
| 5/10 | udp: refine __udp_enqueue_schedule_skb() testnet/ | +2 | 5 replies | Applied |
| 6/10 | udp: update sk_rmem_alloc before busylock acquisitionnet/ | +5 | 5 replies | Applied |
| 7/10 | net: group sk_backlog and sk_receive_queueinclude/ | +1 | 3 replies | Applied |
| 8/10 | udp: add udp_drops_inc() helperinclude/ include/ net/ +2 more | +15 | 3 replies | Applied |
| 9/10 | udp: make busylock per socketinclude/ include/ net/ | +4 | 6 replies | Applied |
| 10/10 | udp: use skb_attempt_defer_free()net/ | +7 | 8 replies | Applied |
Reviews trailers per patch
All 10 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Willem de Bruijn | David Ahern | Kuniyuki Iwashima | Jakub Kicinski |
|---|---|---|---|---|
| Series | R-b | |||
| 1/10 | R-b | R-b | R-b | |
| 2/10 | R-b | R-b | R-b | |
| 3/10 | R-b | R-b | R-b | |
| 4/10 | R-b | R-b | R-b | |
| 5/10 | R-b | R-b | R-b | |
| 6/10 | R-b | R-b | R-b | |
| 7/10 | R-b | R-b | R-b | |
| 8/10 | R-b | R-b | R-b | |
| 9/10 | R-b | R-b | R-b | |
| 10/10 | A-b | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH net-next 00/10] udp: increase RX performance under stress
This series is the result of careful analysis of UDP stack, to optimize the receive side, especially when under one or several UDP sockets are receiving a DDOS attack.
I have measured a 47 % increase of throughput when using IPv6 UDP packets with 120 bytes of payload, under DDOS.
16 cpus are receiving traffic targeting a single socket.
Even after adding NUMA aware drop counters, we were suffering from false sharing between packet producers and the consumer.
1) First four patches are shrinking struct ipv6_pinfo size and reorganize fields to get more efficient TX path. They should also benefit TCP, by removing one cache line miss.
2) patches 5 & 6 changes how sk->sk_rmem_alloc is read and updated. They reduce reduce spinlock contention on the busylock.
3) Patches 7 & 8 change the ordering of sk_backlog (including sk_rmem_alloc) sk_receive_queue and sk_drop_counters for better data locality.
4) Patch 9 removes the hashed array of spinlocks in favor of a per-udp-socket one.
5) Final patch adopts skb_attempt_defer_free(), after TCP got good results with it.
Eric Dumazet (10):
ipv6: make ipv6_pinfo.saddr_cache a boolean
ipv6: make ipv6_pinfo.daddr_cache a boolean
ipv6: np->rxpmtu race annotation
ipv6: reorganise struct ipv6_pinfo
udp: refine __udp_enqueue_schedule_skb() test
udp: update sk_rmem_alloc before busylock acquisition
net: group sk_backlog and sk_receive_queue
udp: add udp_drops_inc() helper
udp: make busylock per socket
udp: use skb_attempt_defer_free()
include/linux/ipv6.h | 37 ++++++++++++----------- include/linux/udp.h | 1 + include/net/ip6_route.h | 8 ++--- include/net/sock.h | 4 +-- include/net/udp.h | 6 ++++ net/core/sock.c | 1 - net/ipv4/udp.c | 50 ++++++++++++++------------------ net/ipv6/af_inet6.c | 2 +- net/ipv6/inet6_connection_sock.c | 2 +- net/ipv6/ip6_output.c | 6 ++-- net/ipv6/raw.c | 2 +- net/ipv6/route.c | 7 ++--- net/ipv6/tcp_ipv6.c | 4 +-- net/ipv6/udp.c | 8 ++--- 14 files changed, 69 insertions(+), 69 deletions(-)
Signature · 1 line
2.51.0.384.g4c02a37b29-goog