net: better drop accounting
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 · linked by author and title
- v2 Latest5 patches 4 repliesApplied 5/5
- v13 patches 9 repliesSuperseded
Patches in v2 All 5 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | net: add sk_drops_read(), sk_drops_inc() and sk_drops_reset() helpersinclude/ include/ net/ +14 more | +57 | 0 replies | Applied |
| 2/5 | net: add sk_drops_skbadd() helperinclude/ include/ include/ +4 more | +16 | 1 reply | Applied |
| 3/5 | net: add sk->sk_drop_countersinclude/ net/ | +33 | 1 reply | Applied |
| 4/5 | udp: add drop_counters to udp socketinclude/ include/ tools/ +1 more | +6 | 1 reply | Applied |
| 5/5 | inet: raw: add drop_counters to raw socketsinclude/ include/ net/ +1 more | +4 | 1 reply | Applied |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Kuniyuki Iwashima |
|---|---|
| 1/5 | R-b |
| 2/5 | R-b |
| 3/5 | R-b |
| 4/5 | R-b |
| 5/5 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 net-next 0/5] net: better drop accounting
Incrementing sk->sk_drops for every dropped packet can cause serious cache line contention under DOS.
Add optional sk->sk_drop_counters pointer so that protocols can opt-in to use two dedicated cache lines to hold drop counters.
Convert UDP and RAW to use this infrastructure.
Tested on UDP (see patch 4/5 for details)
Before:
nstat -n ; sleep 1 ; nstat | grep Udp
Udp6InDatagrams 615091 0.0 Udp6InErrors 3904277 0.0 Udp6RcvbufErrors 3904277 0.0
After:
nstat -n ; sleep 1 ; nstat | grep Udp
Udp6InDatagrams 816281 0.0 Udp6InErrors 7497093 0.0 Udp6RcvbufErrors 7497093 0.0
Eric Dumazet (5):
net: add sk_drops_read(), sk_drops_inc() and sk_drops_reset() helpers
net: add sk_drops_skbadd() helper
net: add sk->sk_drop_counters
udp: add drop_counters to udp socket
inet: raw: add drop_counters to raw sockets
include/linux/ipv6.h | 2 +- include/linux/skmsg.h | 2 +- include/linux/udp.h | 1 + include/net/raw.h | 1 + include/net/sock.h | 56 ++++++++++++++++++- include/net/tcp.h | 2 +- include/net/udp.h | 3 +- net/core/datagram.c | 2 +- net/core/sock.c | 16 +++--- net/ipv4/ping.c | 2 +- net/ipv4/raw.c | 7 ++- net/ipv4/tcp_input.c | 2 +- net/ipv4/tcp_ipv4.c | 4 +- net/ipv4/udp.c | 14 ++--- net/ipv6/datagram.c | 2 +- net/ipv6/raw.c | 9 +-- net/ipv6/tcp_ipv6.c | 4 +- net/ipv6/udp.c | 6 +- net/iucv/af_iucv.c | 4 +- net/mptcp/protocol.c | 2 +- net/netlink/af_netlink.c | 4 +- net/packet/af_packet.c | 2 +- net/phonet/pep.c | 6 +- net/phonet/socket.c | 2 +- net/sctp/diag.c | 2 +- net/tipc/socket.c | 6 +- .../selftests/bpf/progs/bpf_iter_udp4.c | 3 +- .../selftests/bpf/progs/bpf_iter_udp6.c | 4 +- 28 files changed, 114 insertions(+), 56 deletions(-)
Signature · 1 line
2.51.0.261.g7ce5a0a67e-goog