lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250724212837119BP9HOs0ibXDRWgsXMMir7@zte.com.cn>
Date: Thu, 24 Jul 2025 21:28:37 +0800 (CST)
From: <fan.yu9@....com.cn>
To: <dumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
        <horms@...nel.org>, <davem@...emloft.net>, <jiri@...nulli.us>,
        <xiyou.wangcong@...il.com>, <jhs@...atatu.com>
Cc: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <xu.xin16@....com.cn>, <yang.yang29@....com.cn>,
        <tu.qiang35@....com.cn>, <jiang.kun2@....com.cn>,
        <wang.yaxin@....com.cn>, <qiu.yutan@....com.cn>,
        <he.peilin@....com.cn>
Subject: [PATCH net-next] net/sched: Add precise drop reason for pfifo_fast queue overflows

From: Fan Yu <fan.yu9@....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@....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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ