aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-04-15 17:10:45 -0700
committerDavid S. Miller <davem@davemloft.net>2022-04-17 13:31:31 +0100
commite7c89ae4078eab24af71ba26b91642e819a4bd7f (patch)
treea5a20ce801fbc682082e6f0c241c473d278893f1 /net/ipv4/tcp_input.c
parenttcp: add two drop reasons for tcp_ack() (diff)
downloadlinux-dev-e7c89ae4078eab24af71ba26b91642e819a4bd7f.tar.xz
linux-dev-e7c89ae4078eab24af71ba26b91642e819a4bd7f.zip
tcp: add drop reason support to tcp_prune_ofo_queue()
Add one reason for packets dropped from OFO queue because of memory pressure. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 8a68785b0405..a1077adeb1b6 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5334,7 +5334,8 @@ static bool tcp_prune_ofo_queue(struct sock *sk)
prev = rb_prev(node);
rb_erase(node, &tp->out_of_order_queue);
goal -= rb_to_skb(node)->truesize;
- tcp_drop(sk, rb_to_skb(node));
+ tcp_drop_reason(sk, rb_to_skb(node),
+ SKB_DROP_REASON_TCP_OFO_QUEUE_PRUNE);
if (!prev || goal <= 0) {
sk_mem_reclaim(sk);
if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf &&