]> git.baikalelectronics.ru Git - kernel.git/commit
nft_set_pipapo: Fix bucket load in AVX2 lookup routine for six 8-bit groups
authorStefano Brivio <sbrivio@redhat.com>
Sat, 27 Nov 2021 10:33:37 +0000 (11:33 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 8 Dec 2021 00:05:55 +0000 (01:05 +0100)
commit4a4f4ea9a65bb51b8d693f4ce75329b85de155a3
tree8b3031534594b667d52a91d3a87a3a2682912e19
parent89eecf1f5cb431da0f08e1016c0cebebf7f25a2b
nft_set_pipapo: Fix bucket load in AVX2 lookup routine for six 8-bit groups

The sixth byte of packet data has to be looked up in the sixth group,
not in the seventh one, even if we load the bucket data into ymm6
(and not ymm5, for convenience of tracking stalls).

Without this fix, matching on a MAC address as first field of a set,
if 8-bit groups are selected (due to a small set size) would fail,
that is, the given MAC address would never match.

Reported-by: Nikita Yushchenko <nikita.yushchenko@virtuozzo.com>
Cc: <stable@vger.kernel.org> # 5.6.x
Fixes: 8ce41630d4cc ("nft_set_pipapo: Introduce AVX2-based lookup implementation")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Tested-By: Nikita Yushchenko <nikita.yushchenko@virtuozzo.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_set_pipapo_avx2.c