netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] Revert "net: sched: route: don't set arg->stop in route4_walk() when empty"
@ 2019-02-27 13:48 Vlad Buslov
  2019-02-27 18:12 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Vlad Buslov @ 2019-02-27 13:48 UTC (permalink / raw)
  To: netdev; +Cc: jhs, xiyou.wangcong, jiri, davem, Vlad Buslov

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(-)

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++) {
-- 
2.13.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] Revert "net: sched: route: don't set arg->stop in route4_walk() when empty"
  2019-02-27 13:48 [PATCH net-next] Revert "net: sched: route: don't set arg->stop in route4_walk() when empty" Vlad Buslov
@ 2019-02-27 18:12 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-02-27 18:12 UTC (permalink / raw)
  To: vladbu; +Cc: netdev, jhs, xiyou.wangcong, jiri

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-27 18:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-27 13:48 [PATCH net-next] Revert "net: sched: route: don't set arg->stop in route4_walk() when empty" Vlad Buslov
2019-02-27 18:12 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).