lkml.org 
[lkml]   [2022]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH net-next 3/3] net: sched: sch_red: add statistics when calling qdisc_drop() in sch_red
Date
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@huawei.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
\
 
 \ /
  Last update: 2022-08-25 05:27    [W:0.084 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site