netfilter: nft_set_rbtree: use read spinlock to avoid datapath contention
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 5 Sep 2023 10:52:24 +0000 (12:52 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 8 Sep 2023 01:26:57 +0000 (03:26 +0200)
commit96b33300fba880ec0eafcf3d82486f3463b4b6da
tree8e20324109e318e2a6cf9d96fc02232367543e73
parentf15f29fd4779be8a418b66e9d52979bb6d6c2325
netfilter: nft_set_rbtree: use read spinlock to avoid datapath contention

rbtree GC does not modify the datastructure, instead it collects expired
elements and it enqueues a GC transaction. Use a read spinlock instead
to avoid data contention while GC worker is running.

Fixes: f6c383b8c31a ("netfilter: nf_tables: adapt set backend to use GC transaction API")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_set_rbtree.c