Skip to contentSkip to conversation

drivers: fix build warnings when using icx

PATCH In review Bruce Richardson 1 participant 2 messages Feb 10, 2025 – Feb 11, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: fix build warnings when using icx

The Intel oneAPI DPC++/C++ Compiler (icx), issues warnings on build when the "-march=native", or other configured global "-march" flag, is overridden to "skylake-avx512", when compiling AVX-512 code.

Allow building with icx with warnings-as-errors flag (werror) enabled by disabling the warning for the cases where we pass that extra "-march" flag.

Fixes e6a6a138919f ("net/i40e: add AVX512 vector path")
Fixes 31737f2b66fb ("net/iavf: enable AVX512 for legacy Rx")
Fixes 7f85d5ebcfe1 ("net/ice: add AVX512 vector path")
Fixes 0fac6a1c44d5 ("common/idpf: add AVX512 for single queue model")
---
 drivers/common/idpf/meson.build    | 3 +++
 drivers/net/intel/i40e/meson.build | 3 +++
 drivers/net/intel/iavf/meson.build | 3 +++
 drivers/net/intel/ice/meson.build  | 3 +++
 4 files changed, 12 insertions(+)
drivers/common/idpf/meson.build +3 -0
index 46fd45c03b..7dbcdabd90 100644
@@ -21,6 +21,9 @@ if arch_subdir == 'x86'
         avx512_args = cflags + cc_avx512_flags
         if cc.has_argument('-march=skylake-avx512')
             avx512_args += '-march=skylake-avx512'
+            if cc.has_argument('-Wno-overriding-option')
+                avx512_args += '-Wno-overriding-option'
+            endif
         endif
         idpf_common_avx512_lib = static_library('idpf_common_avx512_lib',
                 'idpf_common_rxtx_avx512.c',
drivers/net/intel/i40e/meson.build +3 -0
index 5c93493124..ffa40c5d64 100644
@@ -57,6 +57,9 @@ if arch_subdir == 'x86'
         avx512_args = cflags + cc_avx512_flags
         if cc.has_argument('-march=skylake-avx512')
             avx512_args += '-march=skylake-avx512'
+            if cc.has_argument('-Wno-overriding-option')
+                avx512_args += '-Wno-overriding-option'
+            endif
         endif
         i40e_avx512_lib = static_library('i40e_avx512_lib',
                 'i40e_rxtx_vec_avx512.c',
drivers/net/intel/iavf/meson.build +3 -0
index d9b605f55a..c2bef0230f 100644
@@ -40,6 +40,9 @@ if arch_subdir == 'x86' and is_variable('static_rte_common_iavf')
         avx512_args = cflags + cc_avx512_flags
         if cc.has_argument('-march=skylake-avx512')
             avx512_args += '-march=skylake-avx512'
+            if cc.has_argument('-Wno-overriding-option')
+                avx512_args += '-Wno-overriding-option'
+            endif
         endif
         iavf_avx512_lib = static_library('iavf_avx512_lib',
                 'iavf_rxtx_vec_avx512.c',
drivers/net/intel/ice/meson.build +3 -0
index beaf21e176..3b13a5913d 100644
@@ -40,6 +40,9 @@ if arch_subdir == 'x86'
         avx512_args = cflags + cc_avx512_flags
         if cc.has_argument('-march=skylake-avx512')
             avx512_args += '-march=skylake-avx512'
+            if cc.has_argument('-Wno-overriding-option')
+                avx512_args += '-Wno-overriding-option'
+            endif
         endif
         ice_avx512_lib = static_library('ice_avx512_lib',
                 'ice_rxtx_vec_avx512.c',
Signature · 1 line
2.43.0
#1 lore raw
Quoted 14 lines · Bruce Richardson

The Intel oneAPI DPC++/C++ Compiler (icx), issues warnings on build when the "-march=native", or other configured global "-march" flag, is overridden to "skylake-avx512", when compiling AVX-512 code.

Allow building with icx with warnings-as-errors flag (werror) enabled by disabling the warning for the cases where we pass that extra "-march" flag.

Fixes e6a6a138919f ("net/i40e: add AVX512 vector path")
Fixes 31737f2b66fb ("net/iavf: enable AVX512 for legacy Rx")
Fixes 7f85d5ebcfe1 ("net/ice: add AVX512 vector path")
Fixes 0fac6a1c44d5 ("common/idpf: add AVX512 for single queue model")
Quoted 3 lines

---

Rebased and applied to dpdk-next-net-intel with new prefix "net/intel" since "common/idpf" has been merged into "net/idpf".

/Bruce