Skip to content

Commit c29e728

Browse files
bruce-richardsondavid-marchand
authored andcommitted
net/intel: use common AVX build handling
Remove driver-specific build instructions for the AVX2 and AVX-512 code, and rely instead on the generic driver build file. Signed-off-by: Bruce Richardson <[email protected]> Acked-by: Konstantin Ananyev <[email protected]>
1 parent d6cb19c commit c29e728

File tree

4 files changed

+8
-96
lines changed

4 files changed

+8
-96
lines changed

drivers/net/intel/i40e/meson.build

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -40,31 +40,8 @@ includes += include_directories('base')
4040

4141
if arch_subdir == 'x86'
4242
sources += files('i40e_rxtx_vec_sse.c')
43-
44-
i40e_avx2_lib = static_library('i40e_avx2_lib',
45-
'i40e_rxtx_vec_avx2.c',
46-
dependencies: [static_rte_ethdev, static_rte_kvargs, static_rte_hash],
47-
include_directories: includes,
48-
c_args: [cflags, cc_avx2_flags])
49-
objs += i40e_avx2_lib.extract_objects('i40e_rxtx_vec_avx2.c')
50-
51-
if cc_has_avx512
52-
cflags += ['-DCC_AVX512_SUPPORT']
53-
avx512_args = cflags + cc_avx512_flags
54-
if cc.has_argument('-march=skylake-avx512')
55-
avx512_args += '-march=skylake-avx512'
56-
if cc.has_argument('-Wno-overriding-option')
57-
avx512_args += '-Wno-overriding-option'
58-
endif
59-
endif
60-
i40e_avx512_lib = static_library('i40e_avx512_lib',
61-
'i40e_rxtx_vec_avx512.c',
62-
dependencies: [static_rte_ethdev,
63-
static_rte_kvargs, static_rte_hash],
64-
include_directories: includes,
65-
c_args: avx512_args)
66-
objs += i40e_avx512_lib.extract_objects('i40e_rxtx_vec_avx512.c')
67-
endif
43+
sources_avx2 += files('i40e_rxtx_vec_avx2.c')
44+
sources_avx512 += files('i40e_rxtx_vec_avx512.c')
6845
elif arch_subdir == 'ppc'
6946
sources += files('i40e_rxtx_vec_altivec.c')
7047
elif arch_subdir == 'arm'

drivers/net/intel/iavf/meson.build

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,8 @@ includes += include_directories('base')
2828

2929
if arch_subdir == 'x86'
3030
sources += files('iavf_rxtx_vec_sse.c')
31-
32-
iavf_avx2_lib = static_library('iavf_avx2_lib',
33-
'iavf_rxtx_vec_avx2.c',
34-
dependencies: [static_rte_ethdev],
35-
include_directories: includes,
36-
c_args: [cflags, cc_avx2_flags])
37-
objs += iavf_avx2_lib.extract_objects('iavf_rxtx_vec_avx2.c')
38-
39-
if cc_has_avx512
40-
cflags += ['-DCC_AVX512_SUPPORT']
41-
avx512_args = cflags + cc_avx512_flags
42-
if cc.has_argument('-march=skylake-avx512')
43-
avx512_args += '-march=skylake-avx512'
44-
if cc.has_argument('-Wno-overriding-option')
45-
avx512_args += '-Wno-overriding-option'
46-
endif
47-
endif
48-
iavf_avx512_lib = static_library('iavf_avx512_lib',
49-
'iavf_rxtx_vec_avx512.c',
50-
dependencies: [static_rte_ethdev],
51-
include_directories: includes,
52-
c_args: avx512_args)
53-
objs += iavf_avx512_lib.extract_objects('iavf_rxtx_vec_avx512.c')
54-
endif
31+
sources_avx2 += files('iavf_rxtx_vec_avx2.c')
32+
sources_avx512 += files('iavf_rxtx_vec_avx512.c')
5533
elif arch_subdir == 'arm'
5634
sources += files('iavf_rxtx_vec_neon.c')
5735
endif

drivers/net/intel/ice/meson.build

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,8 @@ endif
3434

3535
if arch_subdir == 'x86'
3636
sources += files('ice_rxtx_vec_sse.c')
37-
38-
ice_avx2_lib = static_library('ice_avx2_lib',
39-
'ice_rxtx_vec_avx2.c',
40-
dependencies: [static_rte_ethdev, static_rte_hash],
41-
include_directories: includes,
42-
c_args: [cflags, cc_avx2_flags])
43-
objs += ice_avx2_lib.extract_objects('ice_rxtx_vec_avx2.c')
44-
45-
if cc_has_avx512
46-
cflags += ['-DCC_AVX512_SUPPORT']
47-
avx512_args = cflags + cc_avx512_flags
48-
if cc.has_argument('-march=skylake-avx512')
49-
avx512_args += '-march=skylake-avx512'
50-
if cc.has_argument('-Wno-overriding-option')
51-
avx512_args += '-Wno-overriding-option'
52-
endif
53-
endif
54-
ice_avx512_lib = static_library('ice_avx512_lib',
55-
'ice_rxtx_vec_avx512.c',
56-
dependencies: [static_rte_ethdev, static_rte_hash],
57-
include_directories: includes,
58-
c_args: avx512_args)
59-
objs += ice_avx512_lib.extract_objects('ice_rxtx_vec_avx512.c')
60-
endif
37+
sources_avx2 += files('ice_rxtx_vec_avx2.c')
38+
sources_avx512 += files('ice_rxtx_vec_avx512.c')
6139
endif
6240

6341
sources += files(

drivers/net/intel/idpf/meson.build

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,8 @@ sources = files(
1919
)
2020

2121
if arch_subdir == 'x86' and dpdk_conf.get('RTE_IOVA_IN_MBUF') == 1
22-
idpf_avx2_lib = static_library('idpf_avx2_lib',
23-
'idpf_common_rxtx_avx2.c',
24-
dependencies: [static_rte_ethdev, static_rte_hash],
25-
include_directories: includes,
26-
c_args: [cflags, cc_avx2_flags])
27-
objs += idpf_avx2_lib.extract_objects('idpf_common_rxtx_avx2.c')
28-
29-
if cc_has_avx512
30-
cflags += ['-DCC_AVX512_SUPPORT']
31-
avx512_args = cflags + cc_avx512_flags
32-
if cc.has_argument('-march=skylake-avx512')
33-
avx512_args += '-march=skylake-avx512'
34-
if cc.has_argument('-Wno-overriding-option')
35-
avx512_args += '-Wno-overriding-option'
36-
endif
37-
endif
38-
idpf_common_avx512_lib = static_library('idpf_common_avx512_lib',
39-
'idpf_common_rxtx_avx512.c',
40-
dependencies: static_rte_mbuf,
41-
include_directories: includes,
42-
c_args: avx512_args)
43-
objs += idpf_common_avx512_lib.extract_objects('idpf_common_rxtx_avx512.c')
44-
endif
22+
sources_avx2 += files('idpf_common_rxtx_avx2.c')
23+
sources_avx512 += files('idpf_common_rxtx_avx512.c')
4524
endif
4625

4726
subdir('base')

0 commit comments

Comments
 (0)