summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_dsmark.c
diff options
context:
space:
mode:
authorZhengchao Shao <shaozhengchao@huawei.com>2022-09-21 10:41:18 +0800
committerJakub Kicinski <kuba@kernel.org>2022-09-22 17:34:10 -0700
commite046fa895c45235095693e44244292a6ab9c3d0b (patch)
tree45837dc5da3932f93d8df53972899351f9b2a796 /net/sched/sch_dsmark.c
parentd7a68e564e29bcd1c70d76d9e2f65591e6183f46 (diff)
downloadlinux-e046fa895c45235095693e44244292a6ab9c3d0b.tar.bz2
net/sched: use tc_qdisc_stats_dump() in qdisc
use tc_qdisc_stats_dump() in qdisc. Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Reviewed-by: Victor Nogueira <victor@mojatatu.com> Tested-by: Victor Nogueira <victor@mojatatu.com> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/sched/sch_dsmark.c')
-rw-r--r--net/sched/sch_dsmark.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index 7da6dc38a382..401ffaf87d62 100644
--- a/net/sched/sch_dsmark.c
+++ b/net/sched/sch_dsmark.c
@@ -176,16 +176,12 @@ static void dsmark_walk(struct Qdisc *sch, struct qdisc_walker *walker)
return;
for (i = 0; i < p->indices; i++) {
- if (p->mv[i].mask == 0xff && !p->mv[i].value)
- goto ignore;
- if (walker->count >= walker->skip) {
- if (walker->fn(sch, i + 1, walker) < 0) {
- walker->stop = 1;
- break;
- }
+ if (p->mv[i].mask == 0xff && !p->mv[i].value) {
+ walker->count++;
+ continue;
}
-ignore:
- walker->count++;
+ if (!tc_qdisc_stats_dump(sch, i + 1, walker))
+ break;
}
}