From: Paul Blakey <paulb@mellanox.com>
To: Paul Blakey <paulb@mellanox.com>, Oz Shlomo <ozsh@mellanox.com>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Majd Dibbiny <majd@mellanox.com>,
netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH 2/3] netfilter: flowtable: Fix missing flush hardware on table free
Date: Thu, 30 Jan 2020 18:04:36 +0200 [thread overview]
Message-ID: <1580400277-6305-3-git-send-email-paulb@mellanox.com> (raw)
In-Reply-To: <1580400277-6305-1-git-send-email-paulb@mellanox.com>
If entries exist when freeing a hardware offload enabled table,
we queue work for hardware while running the gc iteration.
Execute it (flush) after queueing.
Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support")
Signed-off-by: Paul Blakey <paulb@mellanox.com>
---
net/netfilter/nf_flow_table_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netfilter/nf_flow_table_core.c b/net/netfilter/nf_flow_table_core.c
index 14a069c..8af28e1 100644
--- a/net/netfilter/nf_flow_table_core.c
+++ b/net/netfilter/nf_flow_table_core.c
@@ -553,6 +553,7 @@ void nf_flow_table_free(struct nf_flowtable *flow_table)
cancel_delayed_work_sync(&flow_table->gc_work);
nf_flow_table_iterate(flow_table, nf_flow_table_do_cleanup, NULL);
nf_flow_table_iterate(flow_table, nf_flow_offload_gc_step, flow_table);
+ nf_flow_table_offload_flush(flow_table);
rhashtable_destroy(&flow_table->rhashtable);
}
EXPORT_SYMBOL_GPL(nf_flow_table_free);
--
1.8.3.1
next prev parent reply other threads:[~2020-01-30 16:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-30 16:04 [PATCH 0/3] Various fixes for flowtable hardware offload Paul Blakey
2020-01-30 16:04 ` [PATCH 1/3] netfilter: flowtable: Fix hardware flush order on nf_flow_table_cleanup Paul Blakey
2020-01-30 16:04 ` Paul Blakey [this message]
2020-01-30 16:04 ` [PATCH 3/3] netfilter: flowtable: Fix setting forgotten NF_FLOW_HW_DEAD flag Paul Blakey
2020-01-31 18:29 ` [PATCH 0/3] Various fixes for flowtable hardware offload Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1580400277-6305-3-git-send-email-paulb@mellanox.com \
--to=paulb@mellanox.com \
--cc=davem@davemloft.net \
--cc=majd@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=ozsh@mellanox.com \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).