net: not compile PMD AVX library when no IOVA as PA
Checks
Commit Message
PMD not announce pmd_supports_disable_iova_as_pa will not be build
when RTE_IOVA_AS_PA is not defined, but some AVX library for vector
path is not skipped by the build system which cause compile error.
The patch modify i40e, iavf, ice's meson file to skip AVX library
build when RTE_IOVA_AS_PA is not defined.
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/meson.build | 6 ++++--
drivers/net/iavf/meson.build | 6 ++++--
drivers/net/ice/meson.build | 6 ++++--
3 files changed, 12 insertions(+), 6 deletions(-)
@@ -37,6 +37,7 @@ testpmd_sources = files('i40e_testpmd.c')
deps += ['hash']
includes += include_directories('base')
+iova_as_pa = dpdk_conf.get('RTE_IOVA_AS_PA')
if arch_subdir == 'x86'
sources += files('i40e_rxtx_vec_sse.c')
@@ -51,7 +52,7 @@ if arch_subdir == 'x86'
if cc.get_define('__AVX2__', args: machine_args) != ''
cflags += ['-DCC_AVX2_SUPPORT']
sources += files('i40e_rxtx_vec_avx2.c')
- elif cc.has_argument('-mavx2')
+ elif iova_as_pa == true and cc.has_argument('-mavx2')
cflags += ['-DCC_AVX2_SUPPORT']
i40e_avx2_lib = static_library('i40e_avx2_lib',
'i40e_rxtx_vec_avx2.c',
@@ -71,7 +72,8 @@ if arch_subdir == 'x86'
cc.has_argument('-mavx512f') and
cc.has_argument('-mavx512bw'))
- if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true
+ if iova_as_pa == true and
+ (i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true)
cflags += ['-DCC_AVX512_SUPPORT']
avx512_args = [cflags, '-mavx512f', '-mavx512bw']
if cc.has_argument('-march=skylake-avx512')
@@ -6,6 +6,7 @@ cflags += ['-Wno-strict-aliasing']
includes += include_directories('../../common/iavf')
deps += ['common_iavf', 'security', 'cryptodev']
+iova_as_pa = dpdk_conf.get('RTE_IOVA_AS_PA')
sources = files(
'iavf_ethdev.c',
@@ -32,7 +33,7 @@ if arch_subdir == 'x86'
if cc.get_define('__AVX2__', args: machine_args) != ''
cflags += ['-DCC_AVX2_SUPPORT']
sources += files('iavf_rxtx_vec_avx2.c')
- elif cc.has_argument('-mavx2')
+ elif iova_as_pa == true and cc.has_argument('-mavx2')
cflags += ['-DCC_AVX2_SUPPORT']
iavf_avx2_lib = static_library('iavf_avx2_lib',
'iavf_rxtx_vec_avx2.c',
@@ -52,7 +53,8 @@ if arch_subdir == 'x86'
cc.has_argument('-mavx512f') and
cc.has_argument('-mavx512bw'))
- if iavf_avx512_cpu_support == true or iavf_avx512_cc_support == true
+ if iova_as_pa == true and
+ (iavf_avx512_cpu_support == true or iavf_avx512_cc_support == true)
cflags += ['-DCC_AVX512_SUPPORT']
avx512_args = [cflags, '-mavx512f', '-mavx512bw']
if cc.has_argument('-march=skylake-avx512')
@@ -20,6 +20,7 @@ testpmd_sources = files('ice_testpmd.c')
deps += ['hash', 'net', 'common_iavf']
includes += include_directories('base', '../../common/iavf')
+iova_as_pa = dpdk_conf.get('RTE_IOVA_AS_PA')
if arch_subdir == 'x86'
sources += files('ice_rxtx_vec_sse.c')
@@ -34,7 +35,7 @@ if arch_subdir == 'x86'
if cc.get_define('__AVX2__', args: machine_args) != ''
cflags += ['-DCC_AVX2_SUPPORT']
sources += files('ice_rxtx_vec_avx2.c')
- elif cc.has_argument('-mavx2')
+ elif iova_as_pa == true and cc.has_argument('-mavx2')
cflags += ['-DCC_AVX2_SUPPORT']
ice_avx2_lib = static_library('ice_avx2_lib',
'ice_rxtx_vec_avx2.c',
@@ -55,7 +56,8 @@ if arch_subdir == 'x86'
cc.has_argument('-mavx512bw')
)
- if ice_avx512_cpu_support == true or ice_avx512_cc_support == true
+ if iova_as_pa == true and
+ (avx512_cpu_support == true or ice_avx512_cc_support == true)
cflags += ['-DCC_AVX512_SUPPORT']
avx512_args = [cflags, '-mavx512f', '-mavx512bw']
if cc.has_argument('-march=skylake-avx512')