]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit805656cc54159404b444a39307d99a481cc4e5f8
tree14c111b4736bb2fe0386f7818da3b3c9471bda01
parent202edfb5983eabb38d7b41326a51b3234c06a70d
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