Skip to content

tcp: better visibility when receive queues are full

Eric Dumazet netdev 1 version Applied

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

  1. v1 Latest5 patches 7 repliesApplied 5/5

Patches in v1 All 5 applied

#Subject and filesSizeRepliesApplied
1/5tcp: add TCPRcvCollapseSkipped counterDocumentation/networking/snmp_counter.rst include/uapi/linux/snmp.h net/ipv4/proc.c +1 more+11 -01 replyApplied
2/5selftests/net: packetdrill: add tcp_rcv_collapse_ratelimit.pkttools/testing/selftests/net/packetdrill/tcp_rcv_collapse_ratelimit.pkt+96 -01 replyApplied
3/5tcp: use SKB_DROP_REASON_SOCKET_RCVBUFF when over sk_rcvbufnet/ipv4/tcp_input.c+24 -151 replyApplied
4/5net: add SKB_DROP_REASON_MEMCGinclude/net/dropreason-core.h include/net/sock.h net/core/sock.c +1 more+85 -311 replyApplied
5/5selftests/net: packetdrill: add tcp_rcv_collapse.pkttools/testing/selftests/net/packetdrill/tcp_rcv_collapse.pkt+230 -01 replyApplied

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchKuniyuki Iwashima
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/5] tcp: better visibility when receive queues are full

When a TCP socket can not queue an incoming packet, it is currently hard to tell why, and how often the stack had to work to make room.

Patch 1 adds TcpExtTCPRcvCollapseSkipped, counting the collapses skipped by the rate limit added in commit c2213d9b61c1 ("tcp: rate limit receive queue collapsing"). Patch 2 is the packetdrill test for this rate limit.

Patch 3 reports SKB_DROP_REASON_SOCKET_RCVBUFF instead of SKB_DROP_REASON_PROTO_MEM when the socket is over sk_rcvbuf.

Patch 4 adds SKB_DROP_REASON_MEMCG, to tell memory cgroup charge failures from protocol memory limits.

Patch 5 adds a packetdrill test exercising tcp_collapse() on both the out-of-order queue and the receive queue: no existing test was reaching its copy loop.

Eric Dumazet (5):
tcp: add TCPRcvCollapseSkipped counter selftests/net: packetdrill: add tcp_rcv_collapse_ratelimit.pkt
tcp: use SKB_DROP_REASON_SOCKET_RCVBUFF when over sk_rcvbuf
net: add SKB_DROP_REASON_MEMCG
selftests/net: packetdrill: add tcp_rcv_collapse.pkt

 Documentation/networking/snmp_counter.rst     |   7 +
 include/net/dropreason-core.h                 |   6 +
 include/net/sock.h                            |  33 ++-
 include/uapi/linux/snmp.h                     |   1 +
 net/core/sock.c                               |  62 +++--
 net/ipv4/proc.c                               |   1 +
 net/ipv4/tcp_input.c                          |  42 ++--
 .../net/packetdrill/tcp_rcv_collapse.pkt      | 230 ++++++++++++++++++
 .../tcp_rcv_collapse_ratelimit.pkt            |  96 ++++++++
 9 files changed, 439 insertions(+), 39 deletions(-)
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_rcv_collapse.pkt
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_rcv_collapse_ratelimit.pkt
Signature · 1 line
2.53.0