summaryrefslogtreecommitdiff
path: root/net/sched/cls_fw.c
diff options
context:
space:
mode:
authorZhengchao Shao <shaozhengchao@huawei.com>2022-09-16 05:02:44 +0300
committerJakub Kicinski <kuba@kernel.org>2022-09-21 01:54:13 +0300
commit5508ff7cf3750f4a2ab1354754859bb949c0d692 (patch)
tree5edce42504ef9d82cf652e383447c4cba2d3abde /net/sched/cls_fw.c
parentfe0df81df51eb932a83e0c3844106ac6c0f914db (diff)
downloadlinux-5508ff7cf3750f4a2ab1354754859bb949c0d692.tar.xz
net/sched: use tc_cls_stats_dump() in filter
use tc_cls_stats_dump() in filter. Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com> Reviewed-by: Victor Nogueira <victor@mojatatu.com> Tested-by: Victor Nogueira <victor@mojatatu.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/sched/cls_fw.c')
-rw-r--r--net/sched/cls_fw.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c
index 8654b0ce997c..fa66191574a4 100644
--- a/net/sched/cls_fw.c
+++ b/net/sched/cls_fw.c
@@ -358,15 +358,8 @@ static void fw_walk(struct tcf_proto *tp, struct tcf_walker *arg,
for (f = rtnl_dereference(head->ht[h]); f;
f = rtnl_dereference(f->next)) {
- if (arg->count < arg->skip) {
- arg->count++;
- continue;
- }
- if (arg->fn(tp, f, arg) < 0) {
- arg->stop = 1;
+ if (!tc_cls_stats_dump(tp, arg, f))
return;
- }
- arg->count++;
}
}
}