[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220825032943.34778-4-shaozhengchao@huawei.com>
Date: Thu, 25 Aug 2022 11:29:43 +0800
From: Zhengchao Shao <shaozhengchao@...wei.com>
To: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <jhs@...atatu.com>,
<xiyou.wangcong@...il.com>, <jiri@...nulli.us>
CC: <weiyongjun1@...wei.com>, <yuehaibing@...wei.com>,
<shaozhengchao@...wei.com>
Subject: [PATCH net-next 3/3] net: sched: sch_red: add statistics when calling qdisc_drop() in sch_red
Now, the "other" member in the red_sched_data structure is not used.
According to the description, "other" should be added when calling
qdisc_drop() to discard packets.
Signed-off-by: Zhengchao Shao <shaozhengchao@...wei.com>
---
net/sched/sch_red.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c
index 40adf1f07a82..cdf9d8611e41 100644
--- a/net/sched/sch_red.c
+++ b/net/sched/sch_red.c
@@ -141,6 +141,7 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch,
if (!skb)
return NET_XMIT_CN | ret;
+ q->stats.other++;
qdisc_drop(skb, sch, to_free);
return NET_XMIT_CN;
}
--
2.17.1
Powered by blists - more mailing lists