[v4,04/11] drivers/net: remove AVX2 build-time define
Checks
Commit Message
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>
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(-)
@@ -3258,8 +3258,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
@@ -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
@@ -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