diff options
| author | Fan Yu <[email protected]> | 2025-07-24 13:28:37 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-07-25 22:47:21 +0000 |
| commit | bf3c032bfe16489abe38986e2c05fb5f9073319f (patch) | |
| tree | c0050a708a78f00c0a9e5599823d7f3331d612ee | |
| parent | Merge branch 'net-add-sockaddr_inet-unified-address-structure' (diff) | |
| download | kernel-bf3c032bfe16489abe38986e2c05fb5f9073319f.tar.gz kernel-bf3c032bfe16489abe38986e2c05fb5f9073319f.zip | |
net/sched: Add precise drop reason for pfifo_fast queue overflows
Currently, packets dropped by pfifo_fast due to queue overflow are
marked with a generic SKB_DROP_REASON_QDISC_DROP in __dev_xmit_skb().
This patch adds explicit drop reason SKB_DROP_REASON_QDISC_OVERLIMIT
for queue-full cases, providing better distinction from other qdisc drops.
Signed-off-by: Fan Yu <[email protected]>
Reviewed-by: Cong Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
| -rw-r--r-- | net/sched/sch_generic.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 16afb834fe4a..1e008a228ebd 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -740,6 +740,8 @@ static int pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc *qdisc, err = skb_array_produce(q, skb); if (unlikely(err)) { + tcf_set_drop_reason(skb, SKB_DROP_REASON_QDISC_OVERLIMIT); + if (qdisc_is_percpu_stats(qdisc)) return qdisc_drop_cpu(skb, qdisc, to_free); else |
