]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: convert hash and rbtree to set extensions
authorPatrick McHardy <kaber@trash.net>
Wed, 25 Mar 2015 13:07:50 +0000 (13:07 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 25 Mar 2015 16:18:35 +0000 (17:18 +0100)
commit250fb0e35d2d8558b8a58fb9cf20fe92dc2f8f49
tree24b919198c8428189249704b144db4c2cc6ba89f
parent4221c3c4311d64af6c844be0a78b8f8e776690be
netfilter: nf_tables: convert hash and rbtree to set extensions

The set implementations' private struct will only contain the elements
needed to maintain the search structure, all other elements are moved
to the set extensions.

Element allocation and initialization is performed centrally by
nf_tables_api instead of by the different set implementations'
->insert() functions. A new "elemsize" member in the set ops specifies
the amount of memory to reserve for internal usage. Destruction
will also be moved out of the set implementations by a following patch.

Except for element allocation, the patch is a simple conversion to
using data from the extension area.

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