2018-09-19 11:04:17 +01:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
|
|
|
|
|
|
|
|
cflags += ['-Wno-strict-aliasing']
|
|
|
|
|
2020-01-10 09:37:49 +08:00
|
|
|
includes += include_directories('../../common/iavf')
|
|
|
|
deps += ['common_iavf']
|
2018-09-19 11:04:17 +01:00
|
|
|
|
|
|
|
sources = files(
|
2019-02-26 01:18:51 +08:00
|
|
|
'iavf_ethdev.c',
|
|
|
|
'iavf_rxtx.c',
|
|
|
|
'iavf_vchnl.c',
|
2020-04-03 13:42:41 +08:00
|
|
|
'iavf_generic_flow.c',
|
2020-04-21 14:19:26 +08:00
|
|
|
'iavf_fdir.c',
|
2020-04-21 21:02:54 -04:00
|
|
|
'iavf_hash.c',
|
2018-09-19 11:04:17 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
if arch_subdir == 'x86'
|
2019-02-26 01:18:51 +08:00
|
|
|
sources += files('iavf_rxtx_vec_sse.c')
|
2019-10-16 16:14:09 +08:00
|
|
|
|
|
|
|
# compile AVX2 version if either:
|
|
|
|
# a. we have AVX supported in minimum instruction set baseline
|
|
|
|
# b. it's not minimum instruction set, but supported by compiler
|
|
|
|
if dpdk_conf.has('RTE_MACHINE_CPUFLAG_AVX2')
|
|
|
|
cflags += ['-DCC_AVX2_SUPPORT']
|
|
|
|
sources += files('iavf_rxtx_vec_avx2.c')
|
|
|
|
elif cc.has_argument('-mavx2')
|
|
|
|
cflags += ['-DCC_AVX2_SUPPORT']
|
|
|
|
iavf_avx2_lib = static_library('iavf_avx2_lib',
|
|
|
|
'iavf_rxtx_vec_avx2.c',
|
|
|
|
dependencies: [static_rte_ethdev,
|
|
|
|
static_rte_kvargs, static_rte_hash],
|
|
|
|
include_directories: includes,
|
|
|
|
c_args: [cflags, '-mavx2'])
|
|
|
|
objs += iavf_avx2_lib.extract_objects('iavf_rxtx_vec_avx2.c')
|
|
|
|
endif
|
2018-09-19 11:04:17 +01:00
|
|
|
endif
|