Skip to content

Commit b7e945e

Browse files
sbrivio-rhummakynes
authored andcommitted
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 <[email protected]> Cc: <[email protected]> # 5.6.x Fixes: 7400b06 ("nft_set_pipapo: Introduce AVX2-based lookup implementation") Signed-off-by: Stefano Brivio <[email protected]> Tested-By: Nikita Yushchenko <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent d43b75f commit b7e945e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/nft_set_pipapo_avx2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ static int nft_pipapo_avx2_lookup_8b_6(unsigned long *map, unsigned long *fill,
886886
NFT_PIPAPO_AVX2_BUCKET_LOAD8(4, lt, 4, pkt[4], bsize);
887887

888888
NFT_PIPAPO_AVX2_AND(5, 0, 1);
889-
NFT_PIPAPO_AVX2_BUCKET_LOAD8(6, lt, 6, pkt[5], bsize);
889+
NFT_PIPAPO_AVX2_BUCKET_LOAD8(6, lt, 5, pkt[5], bsize);
890890
NFT_PIPAPO_AVX2_AND(7, 2, 3);
891891

892892
/* Stall */

0 commit comments

Comments
 (0)