f-stack/dpdk/drivers/net/enic/meson.build

37 lines
1.1 KiB
Meson
Raw Normal View History

2019-06-25 11:12:58 +00:00
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Cisco Systems, Inc.
sources = files(
'base/vnic_cq.c',
'base/vnic_dev.c',
'base/vnic_intr.c',
'base/vnic_rq.c',
'base/vnic_wq.c',
'enic_clsf.c',
'enic_ethdev.c',
'enic_flow.c',
2020-06-18 16:55:50 +00:00
'enic_fm_flow.c',
2019-06-25 11:12:58 +00:00
'enic_main.c',
'enic_res.c',
'enic_rxtx.c',
2021-02-05 08:48:47 +00:00
'enic_vf_representor.c',
2019-06-25 11:12:58 +00:00
)
deps += ['hash']
includes += include_directories('base')
# The current implementation assumes 64-bit pointers
2021-02-05 08:48:47 +00:00
if cc.get_define('__AVX2__', args: machine_args) != '' and dpdk_conf.get('RTE_ARCH_64')
2019-06-25 11:12:58 +00:00
sources += files('enic_rxtx_vec_avx2.c')
# Build the avx2 handler if the compiler supports it, even though 'machine'
# does not. This is to support users who build for the min supported machine
# and need to run the binary on newer CPUs too.
# This part is from i40e meson.build
2019-11-23 08:13:38 +00:00
elif cc.has_argument('-mavx2') and dpdk_conf.get('RTE_ARCH_64')
2019-06-25 11:12:58 +00:00
enic_avx2_lib = static_library('enic_avx2_lib',
'enic_rxtx_vec_avx2.c',
dependencies: [static_rte_ethdev, static_rte_bus_pci],
include_directories: includes,
c_args: [cflags, '-mavx2'])
objs += enic_avx2_lib.extract_objects('enic_rxtx_vec_avx2.c')
endif