Skip to content

Commit bf3c032

Browse files
Fan Yukuba-moo
authored andcommitted
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 <fan.yu9@zte.com.cn> Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com> Link: https://patch.msgid.link/20250724212837119BP9HOs0ibXDRWgsXMMir7@zte.com.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent fad4df2 commit bf3c032

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

net/sched/sch_generic.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,8 @@ static int pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc *qdisc,
740740
err = skb_array_produce(q, skb);
741741

742742
if (unlikely(err)) {
743+
tcf_set_drop_reason(skb, SKB_DROP_REASON_QDISC_OVERLIMIT);
744+
743745
if (qdisc_is_percpu_stats(qdisc))
744746
return qdisc_drop_cpu(skb, qdisc, to_free);
745747
else

0 commit comments

Comments
 (0)