public inbox for netfilter-devel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH nf 0/2] netfilter: nft_set_pipapo_avx2: don't return non-matching entry
@ 2026-03-18 13:24 Florian Westphal
  2026-03-18 13:24 ` [PATCH nf 1/2] netfilter: nft_set_pipapo_avx2: don't return non-matching entry on expiry Florian Westphal
  2026-03-18 13:24 ` [PATCH nf 2/2] selftests: netfilter: nft_concat_range.sh: add check for flush+reload bug Florian Westphal
  0 siblings, 2 replies; 5+ messages in thread
From: Florian Westphal @ 2026-03-18 13:24 UTC (permalink / raw)
  To: netfilter-devel; +Cc: sbrivio, Florian Westphal

While adding more comprehensive tests for set transactions to
nftables I found nft cannot restore a valid set via:

  (echo flush set t s; cat foo) | nft -f -

... because the avx2 functions can return a non-matching entry iff the entry
that it found in first round was expired.

Patch 1 fixes this bug and patch 2 add a test that triggers the problem.

- C implementation doesn't have this problem
- forcing 'slow' mode in avx2 by axing the actual avx2 routines
  also 'fixes' this issue
- No noticeable performance differences with this patch.
- Also have an alternative fix that calls pipapo_refill OR
  nft_pipapo_avx2_refill, but that diff is significantly larger,
  so I picked the one that is smaller.

Florian Westphal (2):
  netfilter: nft_set_pipapo_avx2: don't return non-matching entry on
    expiry
  selftests: netfilter: nft_concat_range.sh: add check for flush+reload
    bug

 net/netfilter/nft_set_pipapo_avx2.c           | 20 +++---
 .../net/netfilter/nft_concat_range.sh         | 68 ++++++++++++++++++-
 2 files changed, 77 insertions(+), 11 deletions(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-21 14:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18 13:24 [PATCH nf 0/2] netfilter: nft_set_pipapo_avx2: don't return non-matching entry Florian Westphal
2026-03-18 13:24 ` [PATCH nf 1/2] netfilter: nft_set_pipapo_avx2: don't return non-matching entry on expiry Florian Westphal
2026-03-21 14:25   ` Stefano Brivio
2026-03-18 13:24 ` [PATCH nf 2/2] selftests: netfilter: nft_concat_range.sh: add check for flush+reload bug Florian Westphal
2026-03-21 14:25   ` Stefano Brivio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox