summaryrefslogtreecommitdiff
path: root/net/sched
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2017-11-02 15:07:01 +0100
committerDavid S. Miller <davem@davemloft.net>2017-11-03 15:46:15 +0900
commit4bb1b116b7f37a64c08d28213a2e6f87fcef2d8b (patch)
treeb3587014a0c5771d5d6874030cca3ecc50b6afb6 /net/sched
parent9a7b96b3462679a2fcf7205d396dbf1f8f28454c (diff)
net: sched: move block offload unbind after all chains are flushed
Currently, the offload unbind is done before the chains are flushed. That causes driver to unregister block callback before it can get all the callback calls done during flush, leaving the offloaded tps inside the HW. So fix the order to prevent this situation and restore the original behaviour. Reported-by: Alexander Duyck <alexander.duyck@gmail.com> Reported-by: Jakub Kicinski <kubakici@wp.pl> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index a26c690b48ac..3364347bc699 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -343,11 +343,11 @@ void tcf_block_put_ext(struct tcf_block *block,
if (!block)
return;
- tcf_block_offload_unbind(block, q, ei);
-
list_for_each_entry_safe(chain, tmp, &block->chain_list, list)
tcf_chain_flush(chain);
+ tcf_block_offload_unbind(block, q, ei);
+
INIT_WORK(&block->work, tcf_block_put_final);
/* Wait for existing RCU callbacks to cool down, make sure their works
* have been queued before this. We can not flush pending works here