aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2015-03-25 14:08:47 +0000
committerPablo Neira Ayuso <pablo@netfilter.org>2015-03-26 11:09:34 +0100
commit61edafbb47e9f46fb850035b1f8f062564445704 (patch)
tree9adc749e66e69c6cd5b1d82434ab00bf1c406670 /include
parentnetfilter: nf_tables: convert hash and rbtree to set extensions (diff)
downloadlinux-dev-61edafbb47e9f46fb850035b1f8f062564445704.tar.xz
linux-dev-61edafbb47e9f46fb850035b1f8f062564445704.zip
netfilter: nf_tables: consolide set element destruction
With the conversion to set extensions, it is now possible to consolidate the different set element destruction functions. The set implementations' ->remove() functions are changed to only take the element out of their internal data structures. Elements will be freed in a batched fashion after the global transaction's completion RCU grace period. This reduces the amount of grace periods required for nft_hash from N to zero additional ones, additionally this guarantees that the set elements' extensions of all implementations can be used under RCU protection. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/netfilter/nf_tables.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index ef3457c1cb62..6ac63323afd2 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -423,6 +423,8 @@ static inline struct nft_set_ext *nft_set_elem_ext(const struct nft_set *set,
return elem + set->ops->elemsize;
}
+void nft_set_elem_destroy(const struct nft_set *set, void *elem);
+
/**
* struct nft_expr_type - nf_tables expression type
*