netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Florian Westphal <fw@strlen.de>
Cc: <netfilter-devel@vger.kernel.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH nf-next] netfilter: nft_set_pipapo: remove redundant test for avx feature bit
Date: Fri, 29 Aug 2025 10:23:26 +0200	[thread overview]
Message-ID: <20250829102326.6dc1c095@elisabeth> (raw)
In-Reply-To: <20250828235008.23351-1-fw@strlen.de>

On Fri, 29 Aug 2025 01:50:05 +0200
Florian Westphal <fw@strlen.de> wrote:

> Sebastian points out that avx2 depends on avx, see check_cpufeature_deps()
> in arch/x86/kernel/cpu/cpuid-deps.c:
> avx2 feature bit will be cleared when avx isn't available.

Oops, I didn't notice.

> No functional change intended.
> 
> Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Cc: Stefano Brivio <sbrivio@redhat.com>
> Signed-off-by: Florian Westphal <fw@strlen.de>

With or without a minor nit reported below:

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

> ---
>  net/netfilter/nft_set_pipapo.c      | 2 +-
>  net/netfilter/nft_set_pipapo_avx2.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/netfilter/nft_set_pipapo.c b/net/netfilter/nft_set_pipapo.c
> index b385cfcf886f..415be47e0407 100644
> --- a/net/netfilter/nft_set_pipapo.c
> +++ b/net/netfilter/nft_set_pipapo.c
> @@ -530,7 +530,7 @@ static struct nft_pipapo_elem *pipapo_get(const struct nft_pipapo_match *m,
>  	local_bh_disable();
>  
>  #if defined(CONFIG_X86_64) && !defined(CONFIG_UML)
> -	if (boot_cpu_has(X86_FEATURE_AVX2) && boot_cpu_has(X86_FEATURE_AVX) &&
> +	if (boot_cpu_has(X86_FEATURE_AVX2) &&
>  	    irq_fpu_usable()) {

...this could be a single line now.

-- 
Stefano


      reply	other threads:[~2025-08-29  8:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-28 23:50 [PATCH nf-next] netfilter: nft_set_pipapo: remove redundant test for avx feature bit Florian Westphal
2025-08-29  8:23 ` Stefano Brivio [this message]

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=20250829102326.6dc1c095@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=bigeasy@linutronix.de \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).