]> git.baikalelectronics.ru Git - kernel.git/commit
nft_set_pipapo: Generalise group size for buckets
authorStefano Brivio <sbrivio@redhat.com>
Sat, 7 Mar 2020 16:52:32 +0000 (17:52 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 15 Mar 2020 14:27:42 +0000 (15:27 +0100)
commitec9003e46bd5f8be55fe5fca1cc714e87798cd0b
treeb9cb6d4b3f692ad23eadbdca7149e8b2320fee04
parent318101e967164f16a28f5d4519b214a9b5bde6d8
nft_set_pipapo: Generalise group size for buckets

Get rid of all hardcoded assumptions that buckets in lookup tables
correspond to four-bit groups, and replace them with appropriate
calculations based on a variable group size, now stored in struct
field.

The group size could now be in principle any divisor of eight. Note,
though, that lookup and get functions need an implementation
intimately depending on the group size, and the only supported size
there, currently, is four bits, which is also the initial and only
used size at the moment.

While at it, drop 'groups' from struct nft_pipapo: it was never used.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_set_pipapo.c