public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Florian Westphal <fw@strlen.de>
Cc: <netdev@vger.kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	<netfilter-devel@vger.kernel.org>,
	pablo@netfilter.org,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH net-next 4/6] netfilter: nft_set_pipapo: use avx2 algorithm for insertions too
Date: Wed, 20 Aug 2025 17:45:45 +0200	[thread overview]
Message-ID: <20250820174545.398b2373@elisabeth> (raw)
In-Reply-To: <20250820144738.24250-5-fw@strlen.de>

On Wed, 20 Aug 2025 16:47:36 +0200
Florian Westphal <fw@strlen.de> wrote:

> Always prefer the avx2 implementation if its available.
> This greatly improves insertion performance (each insertion
> checks if the new element would overlap with an existing one):
> 
> time nft -f - <<EOF
> table ip pipapo {
> 	set s {
> 		typeof ip saddr . tcp dport
> 		flags interval
> 		size 800000
> 		elements = { 10.1.1.1 - 10.1.1.4 . 3996,
> [.. 800k entries elided .. ]
> 
> before:
> real    1m55.993s
> user    0m2.505s
> sys     1m53.296s
> 
> after:
> real    0m42.586s
> user    0m2.554s
> sys     0m39.811s
> 
> Fold patch from Sebastian:
> 
> kernel_fpu_begin_mask()/ _end() remains in pipapo_get_avx2() where it is
> required.
> 
> A followup patch will add local_lock_t to struct nft_pipapo_scratch in
> order to protect the map pointer. The lock can not be acquired in
> preemption disabled context which is what kernel_fpu_begin*() does.
> 
> Link: https://lore.kernel.org/netfilter-devel/20250818110213.1319982-2-bigeasy@linutronix.de/
> Co-developed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Signed-off-by: Florian Westphal <fw@strlen.de>

Reviewed-by: Stefano Brivio <sbrivio@redhat.com>

-- 
Stefano


  reply	other threads:[~2025-08-20 15:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20 14:47 [PATCH net-next 0/6] netfilter: updates for net-next Florian Westphal
2025-08-20 14:47 ` [PATCH net-next 1/6] netfilter: ctnetlink: remove refcounting in dying list dumping Florian Westphal
2025-08-22  0:30   ` patchwork-bot+netdevbpf
2025-08-20 14:47 ` [PATCH net-next 2/6] netfilter: nft_set_pipapo_avx2: Drop the comment regarding protection Florian Westphal
2025-08-20 14:47 ` [PATCH net-next 3/6] netfilter: nft_set_pipapo_avx2: split lookup function in two parts Florian Westphal
2025-08-20 14:47 ` [PATCH net-next 4/6] netfilter: nft_set_pipapo: use avx2 algorithm for insertions too Florian Westphal
2025-08-20 15:45   ` Stefano Brivio [this message]
2025-08-20 14:47 ` [PATCH net-next 5/6] netfilter: nft_set_pipapo: Store real pointer, adjust later Florian Westphal
2025-08-20 15:44   ` Stefano Brivio
2025-08-20 16:01     ` Sebastian Andrzej Siewior
2025-08-20 16:15       ` Stefano Brivio
2025-08-20 16:29         ` Sebastian Andrzej Siewior
2025-08-20 16:34           ` Stefano Brivio
2025-08-20 21:04             ` Stefano Brivio
2025-08-21  6:37               ` Sebastian Andrzej Siewior
2025-08-20 14:47 ` [PATCH net-next 6/6] netfilter: nft_set_pipapo: Use nested-BH locking for nft_pipapo_scratch Florian Westphal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250820174545.398b2373@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox