]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: flowtable: Fix hardware flush order on nf_flow_table_cleanup
authorPaul Blakey <paulb@mellanox.com>
Thu, 30 Jan 2020 16:04:35 +0000 (18:04 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 31 Jan 2020 18:31:40 +0000 (19:31 +0100)
commit6bf834ed9a22683e1cb44e1101d8bd8387239e95
tree68d6f3e173143b48592ba1153414084a79d7e8b9
parent9729eea7fb3f9352eb860fe43086b0a28e791f95
netfilter: flowtable: Fix hardware flush order on nf_flow_table_cleanup

On netdev down event, nf_flow_table_cleanup() is called for the relevant
device and it cleans all the tables that are on that device.
If one of those tables has hardware offload flag,
nf_flow_table_iterate_cleanup flushes hardware and then runs the gc.
But the gc can queue more hardware work, which will take time to execute.

Instead first add the work, then flush it, to execute it now.

Fixes: 3029814930c4 ("netfilter: nf_flow_table: hardware offload support")
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_flow_table_core.c