nft_set_pipapo: Prepare for vectorised implementation: alignment
authorStefano Brivio <sbrivio@redhat.com>
Sat, 7 Mar 2020 16:52:34 +0000 (17:52 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 15 Mar 2020 14:27:43 +0000 (15:27 +0100)
commitbf3e58392394c8ead0441efe0035abbfcaf472a2
tree14c111b4736bb2fe0386f7818da3b3c9471bda01
parent4051f43116cdc7dc4df729d4ef80d1ac46a1297f
nft_set_pipapo: Prepare for vectorised implementation: alignment

SIMD vector extension sets require stricter alignment than native
instruction sets to operate efficiently (AVX, NEON) or for some
instructions to work at all (AltiVec).

Provide facilities to define arbitrary alignment for lookup tables
and scratch maps. By defining byte alignment with NFT_PIPAPO_ALIGN,
lt_aligned and scratch_aligned pointers become available.

Additional headroom is allocated, and pointers to the possibly
unaligned, originally allocated areas are kept so that they can
be freed.

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