[PATCH net-next] Revert "net: sched: route: don't set arg->stop in route4_walk() when empty"

Subsystems: networking [general], tc subsystem, the rest

STALE2713d

2 messages, 2 authors, 2019-02-27 · open the first message on its own page

[PATCH net-next] Revert "net: sched: route: don't set arg->stop in route4_walk() when empty"

From: Vlad Buslov <hidden>
Date: 2019-02-27 13:49:12

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 <redacted>
---
 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

Re: [PATCH net-next] Revert "net: sched: route: don't set arg->stop in route4_walk() when empty"

From: David Miller <davem@davemloft.net>
Date: 2019-02-27 18:12:56

From: Vlad Buslov <redacted>
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 <redacted>
Looks good, applied, thanks Vlad.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help