netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nf 0/3] netfilter: nft_set_pipapo: map_index must be per set
@ 2024-02-06 12:23 Florian Westphal
  2024-02-06 12:23 ` [PATCH nf 1/3] netfilter: nft_set_pipapo: store index in scratch maps Florian Westphal
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Florian Westphal @ 2024-02-06 12:23 UTC (permalink / raw)
  To: netfilter-devel; +Cc: sbrivio, Florian Westphal

While working on speeding up pipapo rule insertions I found that the
map_index needs to be percpu and per-set, not just percpu.

At this time its possible for a pipapo set to fill the all-zero part
with ones and take the 'might have bits set' as 'start-from-zero' area.

First patch changes scratchpad area to a structure that provides
space for a per-set-and-cpu toggle and uses it of the percpu one.

Second patch prepares for patch 3, adds a new free helper.

Third patch removes the scratch_aligned pointer and makes AVX2
implementation use the exact same memory addresses for read/store of
the matching state.

Florian Westphal (3):
  netfilter: nft_set_pipapo: store index in scratch maps
  netfilter: nft_set_pipapo: add helper to release pcpu scratch area
  netfilter: nft_set_pipapo: remove scratch_aligned pointer

 net/netfilter/nft_set_pipapo.c      | 96 +++++++++++++----------------
 net/netfilter/nft_set_pipapo.h      | 18 ++++--
 net/netfilter/nft_set_pipapo_avx2.c | 17 +++--
 3 files changed, 63 insertions(+), 68 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2024-02-07 19:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-06 12:23 [PATCH nf 0/3] netfilter: nft_set_pipapo: map_index must be per set Florian Westphal
2024-02-06 12:23 ` [PATCH nf 1/3] netfilter: nft_set_pipapo: store index in scratch maps Florian Westphal
2024-02-07 14:15   ` Stefano Brivio
2024-02-07 15:23     ` Florian Westphal
2024-02-07 17:27       ` Stefano Brivio
2024-02-07 19:24         ` Florian Westphal
2024-02-06 12:23 ` [PATCH nf 2/3] netfilter: nft_set_pipapo: add helper to release pcpu scratch area Florian Westphal
2024-02-07 17:29   ` Stefano Brivio
2024-02-06 12:23 ` [PATCH nf 3/3] netfilter: nft_set_pipapo: remove scratch_aligned pointer Florian Westphal
2024-02-07 17:29   ` Stefano Brivio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).