Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] net: sched: fw: don't set arg->stop in fw_walk() when empty
@ 2019-02-15 15:20 Vlad Buslov
  2019-02-17 21:25 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Vlad Buslov @ 2019-02-15 15:20 UTC (permalink / raw)
  To: netdev; +Cc: idosch, jhs, xiyou.wangcong, jiri, davem, Vlad Buslov

Some classifiers set arg->stop in their implementation of tp->walk() API
when empty. Most of classifiers do not adhere to that convention. Do not
set arg->stop in fw_walk() to unify tp->walk() behavior among classifier
implementations.

Fixes: ed76f5edccc9 ("net: sched: protect filter_chain list with filter_chain_lock mutex")
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
---
 net/sched/cls_fw.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c
index 317151bae73b..4e34966f2ae2 100644
--- a/net/sched/cls_fw.c
+++ b/net/sched/cls_fw.c
@@ -362,10 +362,7 @@ static void fw_walk(struct tcf_proto *tp, struct tcf_walker *arg,
 	struct fw_head *head = rtnl_dereference(tp->root);
 	int h;
 
-	if (head == NULL)
-		arg->stop = 1;
-
-	if (arg->stop)
+	if (head == NULL || arg->stop)
 		return;
 
 	for (h = 0; h < HTSIZE; h++) {
-- 
2.13.6


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

end of thread, other threads:[~2019-02-17 21:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-15 15:20 [PATCH net-next] net: sched: fw: don't set arg->stop in fw_walk() when empty Vlad Buslov
2019-02-17 21:25 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox