DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org, david.marchand@redhat.com,
	 Somnath Kotur <somnath.kotur@broadcom.com>,
	Vamsi Attunuru <vattunuru@marvell.com>
Subject: Re: [PATCH v3 04/11] drivers/net: remove AVX2 build-time define
Date: Tue, 18 Mar 2025 10:42:16 -0700	[thread overview]
Message-ID: <CACZ4nhvqY1JQbfX1Z+y2hUqm2BHydG76yZOm6AZawLvnqxvESw@mail.gmail.com> (raw)
In-Reply-To: <20250318173505.314529-5-bruce.richardson@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3143 bytes --]

On Tue, Mar 18, 2025 at 10:35 AM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> Since all supported compilers can generate AVX2 code, we will always
> enable the build of the AVX2 files on x86. This means that
> CC_AVX2_SUPPORT is always true on x86, so it can be removed and a
> regular "#ifdef RTE_ARCH_x86" used in its place.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
For bnxt:
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
>  drivers/net/bnxt/bnxt_ethdev.c        | 2 --
>  drivers/net/octeon_ep/meson.build     | 1 -
>  drivers/net/octeon_ep/otx_ep_ethdev.c | 4 ----
>  3 files changed, 7 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index 144d4377bd..a318604c20 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -3238,8 +3238,6 @@ static const struct {
>  #if defined(RTE_ARCH_X86)
>         {bnxt_crx_pkts_vec,             "Vector SSE"},
>         {bnxt_recv_pkts_vec,            "Vector SSE"},
> -#endif
> -#if defined(RTE_ARCH_X86) && defined(CC_AVX2_SUPPORT)
>         {bnxt_crx_pkts_vec_avx2,        "Vector AVX2"},
>         {bnxt_recv_pkts_vec_avx2,       "Vector AVX2"},
>  #endif
> diff --git a/drivers/net/octeon_ep/meson.build b/drivers/net/octeon_ep/meson.build
> index 9bf4627894..a4a7663d1d 100644
> --- a/drivers/net/octeon_ep/meson.build
> +++ b/drivers/net/octeon_ep/meson.build
> @@ -15,7 +15,6 @@ sources = files(
>
>  if arch_subdir == 'x86'
>      sources += files('cnxk_ep_rx_sse.c')
> -    cflags += ['-DCC_AVX2_SUPPORT']
>      sources_avx2 = files('cnxk_ep_rx_avx.c')
>  endif
>
> diff --git a/drivers/net/octeon_ep/otx_ep_ethdev.c b/drivers/net/octeon_ep/otx_ep_ethdev.c
> index 8b14734b0c..10f2f8a2e0 100644
> --- a/drivers/net/octeon_ep/otx_ep_ethdev.c
> +++ b/drivers/net/octeon_ep/otx_ep_ethdev.c
> @@ -91,11 +91,9 @@ otx_ep_set_rx_func(struct rte_eth_dev *eth_dev)
>                 eth_dev->rx_pkt_burst = &cnxk_ep_recv_pkts;
>  #ifdef RTE_ARCH_X86
>                 eth_dev->rx_pkt_burst = &cnxk_ep_recv_pkts_sse;
> -#ifdef CC_AVX2_SUPPORT
>                 if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256 &&
>                     rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1)
>                         eth_dev->rx_pkt_burst = &cnxk_ep_recv_pkts_avx;
> -#endif
>  #elif defined(RTE_ARCH_ARM64)
>                 eth_dev->rx_pkt_burst = &cnxk_ep_recv_pkts_neon;
>  #endif
> @@ -105,11 +103,9 @@ otx_ep_set_rx_func(struct rte_eth_dev *eth_dev)
>                 eth_dev->rx_pkt_burst = &cn9k_ep_recv_pkts;
>  #ifdef RTE_ARCH_X86
>                 eth_dev->rx_pkt_burst = &cn9k_ep_recv_pkts_sse;
> -#ifdef CC_AVX2_SUPPORT
>                 if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256 &&
>                     rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1)
>                         eth_dev->rx_pkt_burst = &cn9k_ep_recv_pkts_avx;
> -#endif
>  #elif defined(RTE_ARCH_ARM64)
>                 eth_dev->rx_pkt_burst = &cn9k_ep_recv_pkts_neon;
>  #endif
> --
> 2.43.0
>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4205 bytes --]

  reply	other threads:[~2025-03-18 17:42 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-14 17:23 [PATCH 0/3] remove driver-specific logic for AVX builds Bruce Richardson
2025-03-14 17:23 ` [PATCH 1/3] build: add generalized AVX handling for drivers Bruce Richardson
2025-03-14 17:23 ` [PATCH 2/3] net/intel: use common AVX build code Bruce Richardson
2025-03-14 17:23 ` [PATCH 3/3] drivers/net: build use common AVX handling Bruce Richardson
2025-03-14 17:31   ` David Marchand
2025-03-14 17:37     ` Bruce Richardson
2025-03-14 17:44 ` [PATCH v2 0/4] remove driver-specific logic for AVX builds Bruce Richardson
2025-03-14 17:44   ` [PATCH v2 1/4] build: add generalized AVX handling for drivers Bruce Richardson
2025-03-14 17:44   ` [PATCH v2 2/4] net/intel: use common AVX build code Bruce Richardson
2025-03-14 17:44   ` [PATCH v2 3/4] drivers/net: build use common AVX handling Bruce Richardson
2025-03-14 17:44   ` [PATCH v2 4/4] drivers/net: remove AVX2 build-time define Bruce Richardson
2025-03-17  9:47     ` David Marchand
2025-03-17  9:50   ` [PATCH v2 0/4] remove driver-specific logic for AVX builds David Marchand
2025-03-18 11:51     ` Bruce Richardson
2025-03-18 17:34 ` [PATCH v3 00/11] remove component-specific " Bruce Richardson
2025-03-18 17:34   ` [PATCH v3 01/11] build: add generalized AVX handling for drivers Bruce Richardson
2025-03-18 17:34   ` [PATCH v3 02/11] net/intel: use common AVX build code Bruce Richardson
2025-03-18 17:34   ` [PATCH v3 03/11] drivers/net: build use common AVX handling Bruce Richardson
2025-03-18 17:34   ` [PATCH v3 04/11] drivers/net: remove AVX2 build-time define Bruce Richardson
2025-03-18 17:42     ` Ajit Khaparde [this message]
2025-03-18 17:34   ` [PATCH v3 05/11] event/dlb2: build using common AVX handling Bruce Richardson
2025-03-18 17:34   ` [PATCH v3 06/11] build: add generalized AVX handling for libs Bruce Richardson
2025-03-18 17:35   ` [PATCH v3 07/11] acl: use common AVX build handling Bruce Richardson
2025-03-18 17:35   ` [PATCH v3 08/11] fib: " Bruce Richardson
2025-03-18 17:35   ` [PATCH v3 09/11] net: simplify build-time logic for x86 Bruce Richardson
2025-03-18 17:35   ` [PATCH v3 10/11] net: use common AVX512 build code Bruce Richardson
2025-03-18 17:35   ` [PATCH v3 11/11] member: use common AVX512 build support Bruce Richardson

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=CACZ4nhvqY1JQbfX1Z+y2hUqm2BHydG76yZOm6AZawLvnqxvESw@mail.gmail.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=somnath.kotur@broadcom.com \
    --cc=vattunuru@marvell.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).