Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@kernel.org>
To: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Kuniyuki Iwashima <kuniyu@google.com>,
	Neal Cardwell <ncardwell@google.com>
Cc: Simon Horman <horms@kernel.org>,
	netdev@vger.kernel.org, Eric Dumazet <edumazet@kernel.org>
Subject: [PATCH net-next 0/5] tcp: better visibility when receive queues are full
Date: Sat, 14 Nov 2026 16:51:45 +0100	[thread overview]
Message-ID: <20261114155150.235743-1-edumazet@kernel.org> (raw)

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

-- 
2.53.0


             reply	other threads:[~2026-11-14 15:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14 15:51 Eric Dumazet [this message]
2026-11-14 15:51 ` [PATCH net-next 1/5] tcp: add TCPRcvCollapseSkipped counter Eric Dumazet
2026-11-14 16:28   ` Kuniyuki Iwashima
2026-11-14 15:51 ` [PATCH net-next 2/5] selftests/net: packetdrill: add tcp_rcv_collapse_ratelimit.pkt Eric Dumazet
2026-11-14 16:34   ` Kuniyuki Iwashima
2026-11-14 15:51 ` [PATCH net-next 3/5] tcp: use SKB_DROP_REASON_SOCKET_RCVBUFF when over sk_rcvbuf Eric Dumazet
2026-11-14 16:36   ` Kuniyuki Iwashima
2026-11-14 15:51 ` [PATCH net-next 4/5] net: add SKB_DROP_REASON_MEMCG Eric Dumazet
2026-11-14 16:43   ` Kuniyuki Iwashima
2026-11-14 15:51 ` [PATCH net-next 5/5] selftests/net: packetdrill: add tcp_rcv_collapse.pkt Eric Dumazet
2026-11-14 16:49   ` Kuniyuki Iwashima

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261114155150.235743-1-edumazet@kernel.org \
    --to=edumazet@kernel.org \
    --cc=davem@davemloft.net \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox