Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] net/sched: Add precise drop reason for pfifo_fast queue overflows
@ 2025-07-24 13:28 fan.yu9
  2025-07-25 17:25 ` Cong Wang
  2025-07-25 23:26 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 5+ messages in thread
From: fan.yu9 @ 2025-07-24 13:28 UTC (permalink / raw)
  To: dumazet, kuba, pabeni, horms, davem, jiri, xiyou.wangcong, jhs
  Cc: netdev, linux-kernel, xu.xin16, yang.yang29, tu.qiang35,
	jiang.kun2, wang.yaxin, qiu.yutan, he.peilin

From: Fan Yu <fan.yu9@zte.com.cn>

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 <fan.yu9@zte.com.cn>
---
 net/sched/sch_generic.c | 2 ++
 1 file changed, 2 insertions(+)

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
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-07-28 12:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-24 13:28 [PATCH net-next] net/sched: Add precise drop reason for pfifo_fast queue overflows fan.yu9
2025-07-25 17:25 ` Cong Wang
2025-07-28  9:11   ` fan.yu9
2025-07-28 12:01     ` Simon Horman
2025-07-25 23:26 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox