Message ID | 20220825032943.34778-3-shaozhengchao@huawei.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: sched: add other statistics when calling qdisc_drop() | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Clearly marked for net-next |
netdev/fixes_present | success | Fixes tag not required for -next series |
netdev/subject_prefix | success | Link |
netdev/cover_letter | success | Series has a cover letter |
netdev/patch_count | success | Link |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 3740 this patch: 3740 |
netdev/cc_maintainers | success | CCed 8 of 8 maintainers |
netdev/build_clang | success | Errors and warnings before: 0 this patch: 0 |
netdev/module_param | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/check_selftest | success | No net selftest shell script |
netdev/verify_fixes | success | No Fixes tag |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 3740 this patch: 3740 |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 19 lines checked |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/source_inline | success | Was 0 now: 0 |
diff --git a/include/net/red.h b/include/net/red.h index 30c6a23ab8cc..dad41eff8c62 100644 --- a/include/net/red.h +++ b/include/net/red.h @@ -122,7 +122,7 @@ struct red_stats { u32 forced_drop; /* Forced drops, qavg > max_thresh */ u32 forced_mark; /* Forced marks, qavg > max_thresh */ u32 pdrop; /* Drops due to queue limits */ - u32 other; /* Drops due to drop() calls */ + u32 other; /* Drops due to qdisc_drop() calls */ }; struct red_parms { diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c index 1073c76d05c4..c50a0853dcb9 100644 --- a/net/sched/sch_gred.c +++ b/net/sched/sch_gred.c @@ -251,9 +251,11 @@ static int gred_enqueue(struct sk_buff *skb, struct Qdisc *sch, q->stats.pdrop++; drop: + q->stats.other++; return qdisc_drop(skb, sch, to_free); congestion_drop: + q->stats.other++; qdisc_drop(skb, sch, to_free); return NET_XMIT_CN; }
Now, the "other" member in the gred_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> --- include/net/red.h | 2 +- net/sched/sch_gred.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)