On Sat, Nov 14, 2026 at 7:52 AM Eric Dumazet [off-list ref] wrote:
tcp_data_queue() and tcp_data_queue_ofo() use SKB_DROP_REASON_PROTO_MEM
for all packets that can not be queued, whether the socket is over its
receive buffer, or the protocol memory limits (tcp_mem) are reached.
Make tcp_try_rmem_schedule() return a drop reason:
- SKB_DROP_REASON_SOCKET_RCVBUFF when the socket is over sk_rcvbuf,
as already used by UDP and sock_queue_rcv_skb().
- SKB_DROP_REASON_PROTO_MEM when sk_rmem_schedule() fails.
This helps to identify peers repeatedly sending segments that can not
be queued, with tools like drop monitor or perf.
Signed-off-by: Eric Dumazet <edumazet@kernel.org>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>