[v3,05/10] net/i40e: use global AVX-512 variables

Message ID 20241008165258.2802099-6-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/i40e/meson.build | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
  

Patch

diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build
index 80171b9dc6..ef7b1f5d34 100644
--- a/drivers/net/i40e/meson.build
+++ b/drivers/net/i40e/meson.build
@@ -57,18 +57,9 @@  if arch_subdir == 'x86'
             c_args: [cflags, '-mavx2'])
     objs += i40e_avx2_lib.extract_objects('i40e_rxtx_vec_avx2.c')
 
-    i40e_avx512_cpu_support = (
-        cc.get_define('__AVX512F__', args: machine_args) != '' and
-        cc.get_define('__AVX512BW__', args: machine_args) != '')
-
-    i40e_avx512_cc_support = (
-        not machine_args.contains('-mno-avx512f') and
-        cc.has_argument('-mavx512f') and
-        cc.has_argument('-mavx512bw'))
-
-    if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true
+    if cc_has_avx512
         cflags += ['-DCC_AVX512_SUPPORT']
-        avx512_args = [cflags, '-mavx512f', '-mavx512bw']
+        avx512_args = cflags + cc_avx512_flags
         if cc.has_argument('-march=skylake-avx512')
             avx512_args += '-march=skylake-avx512'
         endif