[v1] common/idpf: fix compilation for AVX512DQ

Message ID 20230209022749.2468940-1-wenjun1.wu@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series [v1] common/idpf: fix compilation for AVX512DQ |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/iol-testing warning apply patch failure
ci/loongarch-unit-testing success Unit Testing PASS

Commit Message

Wenjun Wu Feb. 9, 2023, 2:27 a.m. UTC
  Some intrinsics used in idpf split queue AVX512 datapath ask for CPUID
flag AVX512DQ and compilation flag -mavx512dq.

Fixes: 43e916179fa2 ("common/idpf: add AVX512 data path for split queue model")

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
---
 drivers/common/idpf/meson.build | 8 +++++---
 drivers/net/idpf/meson.build    | 6 ++++--
 2 files changed, 9 insertions(+), 5 deletions(-)
  

Patch

diff --git a/drivers/common/idpf/meson.build b/drivers/common/idpf/meson.build
index 13df0d9ac3..0272548040 100644
--- a/drivers/common/idpf/meson.build
+++ b/drivers/common/idpf/meson.build
@@ -12,18 +12,20 @@  sources = files(
 if arch_subdir == 'x86'
     idpf_avx512_cpu_support = (
         cc.get_define('__AVX512F__', args: machine_args) != '' and
-        cc.get_define('__AVX512BW__', args: machine_args) != ''
+        cc.get_define('__AVX512BW__', args: machine_args) != '' and
+        cc.get_define('__AVX512DQ__', args: machine_args)
     )
 
     idpf_avx512_cc_support = (
         not machine_args.contains('-mno-avx512f') and
         cc.has_argument('-mavx512f') and
-        cc.has_argument('-mavx512bw')
+        cc.has_argument('-mavx512bw') and
+        cc.has_argument('-mavx512dq')
     )
 
     if idpf_avx512_cpu_support == true or idpf_avx512_cc_support == true
         cflags += ['-DCC_AVX512_SUPPORT']
-        avx512_args = [cflags, '-mavx512f', '-mavx512bw']
+        avx512_args = [cflags, '-mavx512f', '-mavx512bw', '-mavx512dq']
         if cc.has_argument('-march=skylake-avx512')
             avx512_args += '-march=skylake-avx512'
         endif
diff --git a/drivers/net/idpf/meson.build b/drivers/net/idpf/meson.build
index 98f8ceb77b..f8fcb21a3c 100644
--- a/drivers/net/idpf/meson.build
+++ b/drivers/net/idpf/meson.build
@@ -23,13 +23,15 @@  sources = files(
 if arch_subdir == 'x86'
     idpf_avx512_cpu_support = (
         cc.get_define('__AVX512F__', args: machine_args) != '' and
-        cc.get_define('__AVX512BW__', args: machine_args) != ''
+        cc.get_define('__AVX512BW__', args: machine_args) != '' and
+        cc.get_define('__AVX512DQ__', args: machine_args) != ''
     )
 
     idpf_avx512_cc_support = (
         not machine_args.contains('-mno-avx512f') and
         cc.has_argument('-mavx512f') and
-        cc.has_argument('-mavx512bw')
+        cc.has_argument('-mavx512bw') and
+        cc.has_argument('-mavx512dq')
     )
 
     if idpf_avx512_cpu_support == true or idpf_avx512_cc_support == true