netfilter: nf_tables: consolide set element destruction
authorPatrick McHardy <kaber@trash.net>
Wed, 25 Mar 2015 14:08:47 +0000 (14:08 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 26 Mar 2015 10:09:34 +0000 (11:09 +0100)
commit61edafbb47e9f46fb850035b1f8f062564445704
tree9adc749e66e69c6cd5b1d82434ab00bf1c406670
parentfe2811ebeb97a7a76de0b2b35f13600169508393
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>
include/net/netfilter/nf_tables.h
net/netfilter/nf_tables_api.c
net/netfilter/nft_hash.c
net/netfilter/nft_rbtree.c