Re: [PATCH nf-next] netfilter: nft_set_pipapo: remove redundant test for avx feature bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 29 Aug 2025 01:50:05 +0200
Florian Westphal <fw@xxxxxxxxx> 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@xxxxxxxxxxxxx>
> Cc: Stefano Brivio <sbrivio@xxxxxxxxxx>
> Signed-off-by: Florian Westphal <fw@xxxxxxxxx>

With or without a minor nit reported below:

Reviewed-by: Stefano Brivio <sbrivio@xxxxxxxxxx>

> ---
>  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





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux