Skip to content

Commit 6a64f40

Browse files
bruce-richardsondavid-marchand
authored andcommitted
drivers/net: remove AVX2 build-time define
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 <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Konstantin Ananyev <[email protected]>
1 parent 469a556 commit 6a64f40

File tree

3 files changed

+0
-7
lines changed

3 files changed

+0
-7
lines changed

drivers/net/bnxt/bnxt_ethdev.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3258,8 +3258,6 @@ static const struct {
32583258
#if defined(RTE_ARCH_X86)
32593259
{bnxt_crx_pkts_vec, "Vector SSE"},
32603260
{bnxt_recv_pkts_vec, "Vector SSE"},
3261-
#endif
3262-
#if defined(RTE_ARCH_X86) && defined(CC_AVX2_SUPPORT)
32633261
{bnxt_crx_pkts_vec_avx2, "Vector AVX2"},
32643262
{bnxt_recv_pkts_vec_avx2, "Vector AVX2"},
32653263
#endif

drivers/net/octeon_ep/meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ sources = files(
1515

1616
if arch_subdir == 'x86'
1717
sources += files('cnxk_ep_rx_sse.c')
18-
cflags += ['-DCC_AVX2_SUPPORT']
1918
sources_avx2 += files('cnxk_ep_rx_avx.c')
2019
endif
2120

drivers/net/octeon_ep/otx_ep_ethdev.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,9 @@ otx_ep_set_rx_func(struct rte_eth_dev *eth_dev)
9191
eth_dev->rx_pkt_burst = &cnxk_ep_recv_pkts;
9292
#ifdef RTE_ARCH_X86
9393
eth_dev->rx_pkt_burst = &cnxk_ep_recv_pkts_sse;
94-
#ifdef CC_AVX2_SUPPORT
9594
if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256 &&
9695
rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1)
9796
eth_dev->rx_pkt_burst = &cnxk_ep_recv_pkts_avx;
98-
#endif
9997
#elif defined(RTE_ARCH_ARM64)
10098
eth_dev->rx_pkt_burst = &cnxk_ep_recv_pkts_neon;
10199
#endif
@@ -105,11 +103,9 @@ otx_ep_set_rx_func(struct rte_eth_dev *eth_dev)
105103
eth_dev->rx_pkt_burst = &cn9k_ep_recv_pkts;
106104
#ifdef RTE_ARCH_X86
107105
eth_dev->rx_pkt_burst = &cn9k_ep_recv_pkts_sse;
108-
#ifdef CC_AVX2_SUPPORT
109106
if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256 &&
110107
rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1)
111108
eth_dev->rx_pkt_burst = &cn9k_ep_recv_pkts_avx;
112-
#endif
113109
#elif defined(RTE_ARCH_ARM64)
114110
eth_dev->rx_pkt_burst = &cn9k_ep_recv_pkts_neon;
115111
#endif

0 commit comments

Comments
 (0)