Message ID | 20190227134859.18424-1-vladbu@mellanox.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | [net-next] Revert "net: sched: route: don't set arg->stop in route4_walk() when empty" | expand |
From: Vlad Buslov <vladbu@mellanox.com> Date: Wed, 27 Feb 2019 15:48:59 +0200 > This reverts commit 3027ff41f67c ("net: sched: route: don't set arg->stop > in route4_walk() when empty") > > Cls API function tcf_proto_is_empty() was changed in commit > 6676d5e416ee ("net: sched: set dedicated tcf_walker flag when tp is empty") > to no longer depend on arg->stop to determine that classifier instance is > empty. Instead, it adds dedicated arg->nonempty field, which makes the fix > in route classifier no longer necessary. > > Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Looks good, applied, thanks Vlad.
diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c index f006af23b64a..319f68cc233f 100644 --- a/net/sched/cls_route.c +++ b/net/sched/cls_route.c @@ -567,7 +567,10 @@ static void route4_walk(struct tcf_proto *tp, struct tcf_walker *arg, struct route4_head *head = rtnl_dereference(tp->root); unsigned int h, h1; - if (head == NULL || arg->stop) + if (head == NULL) + arg->stop = 1; + + if (arg->stop) return; for (h = 0; h <= 256; h++) {
This reverts commit 3027ff41f67c ("net: sched: route: don't set arg->stop in route4_walk() when empty") Cls API function tcf_proto_is_empty() was changed in commit 6676d5e416ee ("net: sched: set dedicated tcf_walker flag when tp is empty") to no longer depend on arg->stop to determine that classifier instance is empty. Instead, it adds dedicated arg->nonempty field, which makes the fix in route classifier no longer necessary. Signed-off-by: Vlad Buslov <vladbu@mellanox.com> --- net/sched/cls_route.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)