[v3,04/10] net/cpfl: use global AVX-512 variables

Message ID 20241008165258.2802099-5-bruce.richardson@intel.com (mailing list archive)
State Accepted
Delegated to: David Marchand
Headers
Series centralize AVX-512 feature detection |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Bruce Richardson Oct. 8, 2024, 4:52 p.m. UTC
Replace per-driver checks for AVX-512 with the standard variables from
config/x86.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/cpfl/meson.build | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)
  

Patch

diff --git a/drivers/net/cpfl/meson.build b/drivers/net/cpfl/meson.build
index e4e0e269bd..87fcfe0bb1 100644
--- a/drivers/net/cpfl/meson.build
+++ b/drivers/net/cpfl/meson.build
@@ -22,23 +22,8 @@  sources = files(
         'cpfl_rules.c',
 )
 
-if arch_subdir == 'x86'
-    cpfl_avx512_cpu_support = (
-        cc.get_define('__AVX512F__', args: machine_args) != '' and
-        cc.get_define('__AVX512BW__', args: machine_args) != '' and
-        cc.get_define('__AVX512DQ__', args: machine_args) != ''
-    )
-
-    cpfl_avx512_cc_support = (
-        not machine_args.contains('-mno-avx512f') and
-        cc.has_argument('-mavx512f') and
-        cc.has_argument('-mavx512bw') and
-        cc.has_argument('-mavx512dq')
-    )
-
-    if cpfl_avx512_cpu_support == true or cpfl_avx512_cc_support == true
-        cflags += ['-DCC_AVX512_SUPPORT']
-    endif
+if arch_subdir == 'x86' and cc_has_avx512
+    cflags += ['-DCC_AVX512_SUPPORT']
 endif
 
 if dpdk_conf.has('RTE_HAS_JANSSON')