net/sxe2: fix build when optional libraries are disabled
Subsystems (2)
PATCH 1/1 net/sxe2: fix build when optional libraries are disabled
This was found by AI sandbox build when doing other fixes to EAL. The sxe2 driver was doing handrolled meson to pick up AVX which fails if security library not present.
Fix build failure when building with
"meson setup build -Denable_libs=eal":
drivers/net/sxe2/meson.build:37:24: ERROR:
Unknown variable name "static_rte_security".
Use sources_avx2 and sources_avx512 instead of hand-rolled static libraries.
Fixes 59d866861188 ("net/sxe2: add AVX2 Rx and Tx")
Fixes 0af0bdcdcf83 ("net/sxe2: add AVX512 Rx and Tx")
Signed-off-by Stephen Hemminger <[email protected]>
--- drivers/net/sxe2/meson.build | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-)
drivers/net/sxe2/meson.build +2 -33
@@ -15,39 +15,8 @@ includes += include_directories('../../common/sxe2') if arch_subdir == 'x86' sources += files('sxe2_txrx_vec_sse.c') - - sxe2_avx512_cpu_support =( - cc.get_define('__AVX512F__', args: machine_args) != '' and - cc.get_define('__AVX512BW__', args: machine_args) != '') - - sxe2_avx512_cc_support = ( - not machine_args.contains('-mno-avx512f') and - cc.has_argument('-mavx512f') and - cc.has_argument('-mavx512bw')) - - if sxe2_avx512_cpu_support == true or sxe2_avx512_cc_support == true - cflags += ['-DCC_AVX512_SUPPORT'] - avx512_args = [cflags, '-mavx512f', '-mavx512bw'] - if cc.has_argument('-march=skylake-avx512') - avx512_args += '-march=skylake-avx512' - endif - sxe2_avx512_lib = static_library('sxe2_avx512_lib', 'sxe2_txrx_vec_avx512.c', - dependencies: [static_rte_ethdev, - static_rte_kvargs, static_rte_hash, - static_rte_security, static_rte_cryptodev, static_rte_bus_pci], - include_directories: includes, - c_args: avx512_args) - objs += sxe2_avx512_lib.extract_objects('sxe2_txrx_vec_avx512.c') - endif - sxe2_avx2_lib = static_library('sxe2_avx2_lib', - 'sxe2_txrx_vec_avx2.c', - dependencies: [static_rte_ethdev, - static_rte_kvargs, static_rte_hash, - static_rte_security, static_rte_cryptodev, - static_rte_bus_pci], - include_directories: includes, - c_args: [cflags, '-mavx2']) - objs += sxe2_avx2_lib.extract_objects('sxe2_txrx_vec_avx2.c') + sources_avx2 += files('sxe2_txrx_vec_avx2.c') + sources_avx512 += files('sxe2_txrx_vec_avx512.c') elif arch_subdir == 'arm' sources += files('sxe2_txrx_vec_neon.c') endif
Signature · 1 line
2.53.0