From: Bruce Richardson <bruce.richardson@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: <dev@dpdk.org>, Yipeng Wang <yipeng1.wang@intel.com>,
Sameh Gobriel <sameh.gobriel@intel.com>
Subject: Re: [PATCH 2/3] member: remove AVX2 build-time checks
Date: Thu, 18 Sep 2025 08:49:49 +0100 [thread overview]
Message-ID: <aMu5neYBpToDBvAp@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20250918073135.1273767-3-thomas@monjalon.net>
On Thu, Sep 18, 2025 at 09:28:04AM +0200, Thomas Monjalon wrote:
> Since all supported compilers can generate AVX2 code,
> no need to check for AVX2 support when x86 arch is already checked.
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> lib/member/rte_member_ht.c | 14 +++++++-------
> lib/member/rte_member_x86.h | 3 ---
> 2 files changed, 7 insertions(+), 10 deletions(-)
>
> diff --git a/lib/member/rte_member_ht.c b/lib/member/rte_member_ht.c
> index 738471b378..0a5b206778 100644
> --- a/lib/member/rte_member_ht.c
> +++ b/lib/member/rte_member_ht.c
> @@ -13,7 +13,7 @@
> #include "rte_member.h"
> #include "rte_member_ht.h"
>
> -#if defined(RTE_ARCH_X86)
> +#ifdef RTE_ARCH_X86
> #include "rte_member_x86.h"
> #endif
>
> @@ -113,7 +113,7 @@ rte_member_create_ht(struct rte_member_setsum *ss,
> for (j = 0; j < RTE_MEMBER_BUCKET_ENTRIES; j++)
> buckets[i].sets[j] = RTE_MEMBER_NO_MATCH;
> }
> -#if defined(RTE_ARCH_X86)
> +#ifdef RTE_ARCH_X86
> if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) &&
> RTE_MEMBER_BUCKET_ENTRIES == 16 &&
> rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256)
> @@ -179,7 +179,7 @@ rte_member_lookup_ht(const struct rte_member_setsum *ss,
> get_buckets_index(ss, key, &prim_bucket, &sec_bucket, &tmp_sig);
>
> switch (ss->sig_cmp_fn) {
> -#if defined(RTE_ARCH_X86) && defined(__AVX2__)
> +#ifdef RTE_ARCH_X86
> case RTE_MEMBER_COMPARE_AVX2:
> if (search_bucket_single_avx(prim_bucket, tmp_sig, buckets,
> set_id) ||
> @@ -219,7 +219,7 @@ rte_member_lookup_bulk_ht(const struct rte_member_setsum *ss,
>
> for (i = 0; i < num_keys; i++) {
> switch (ss->sig_cmp_fn) {
> -#if defined(RTE_ARCH_X86) && defined(__AVX2__)
> +#ifdef RTE_ARCH_X86
As with previous patch, the AVX2 flag cannot be removed here. Compiler
support does not mean build support.
/Bruce
next prev parent reply other threads:[~2025-09-18 7:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 7:28 [PATCH 0/3] lib: fix AVX2 checks and macro exposure Thomas Monjalon
2025-09-18 7:28 ` [PATCH 1/3] efd: fix AVX2 support Thomas Monjalon
2025-09-18 7:48 ` Bruce Richardson
2025-09-18 8:16 ` Thomas Monjalon
2025-09-18 7:28 ` [PATCH 2/3] member: remove AVX2 build-time checks Thomas Monjalon
2025-09-18 7:49 ` Bruce Richardson [this message]
2025-09-18 7:28 ` [PATCH 3/3] member: hide internal macro Thomas Monjalon
2025-09-18 7:50 ` Bruce Richardson
2025-09-18 8:10 ` [PATCH 0/3] lib: fix AVX2 checks and macro exposure Thomas Monjalon
2025-09-18 8:59 ` Bruce Richardson
2025-09-18 9:08 ` [PATCH v2 0/4] " Thomas Monjalon
2025-09-18 9:08 ` [PATCH v2 1/4] efd: fix AVX2 support Thomas Monjalon
2025-09-18 9:40 ` Thomas Monjalon
2025-09-18 9:47 ` Thomas Monjalon
2025-09-18 9:08 ` [PATCH v2 2/4] efd: remove AVX2 build-time check Thomas Monjalon
2025-09-18 9:08 ` [PATCH v2 3/4] member: remove AVX2 build-time checks Thomas Monjalon
2025-09-18 9:08 ` [PATCH v2 4/4] member: hide internal macro Thomas Monjalon
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=aMu5neYBpToDBvAp@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=sameh.gobriel@intel.com \
--cc=thomas@monjalon.net \
--cc=yipeng1.wang@intel.com \
/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).