Skip to content

Commit

Permalink
nft_set_pipapo: Generalise group size for buckets
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefano Brivio authored and Pablo Neira Ayuso committed Mar 15, 2020
1 parent 88bf6e4 commit e807b13
Showing 1 changed file with 112 additions and 96 deletions.
Loading

0 comments on commit e807b13

Please sign in to comment.