]> 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)
commit023e83e897a6c4e2757e1a86bd88741db24b2660
tree14c111b4736bb2fe0386f7818da3b3c9471bda01
parentbb0769fbc9d715c5f6d88a98b8c62f08fad0b49b
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