summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorPaul Blakey <paulb@mellanox.com>2020-03-27 12:12:29 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2020-03-27 18:42:20 +0100
commit422c032afcf57d5e8109a54912e22ffc53d99068 (patch)
treebd4d2a07642a24d79e512e6226467c765aca79a7 /include/net
parent0a6a9515fe390976cd762c52d8d4f446d7a14285 (diff)
netfilter: flowtable: Use rw sem as flow block lock
Currently flow offload threads are synchronized by the flow block mutex. Use rw lock instead to increase flow insertion (read) concurrency. Signed-off-by: Paul Blakey <paulb@mellanox.com> Reviewed-by: Oz Shlomo <ozsh@mellanox.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/netfilter/nf_flow_table.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/netfilter/nf_flow_table.h b/include/net/netfilter/nf_flow_table.h
index 4a2ec6fd9ad2..6bf69652f57d 100644
--- a/include/net/netfilter/nf_flow_table.h
+++ b/include/net/netfilter/nf_flow_table.h
@@ -74,7 +74,7 @@ struct nf_flowtable {
struct delayed_work gc_work;
unsigned int flags;
struct flow_block flow_block;
- struct mutex flow_block_lock; /* Guards flow_block */
+ struct rw_semaphore flow_block_lock; /* Guards flow_block */
possible_net_t net;
};