2017-12-18 15:56:25 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
2018-04-05 17:01:34 +01:00
|
|
|
# Copyright(c) 2017-2018 Intel Corporation
|
2017-10-17 13:43:57 +01:00
|
|
|
|
2019-04-09 11:55:36 +01:00
|
|
|
if not is_linux
|
2021-04-20 11:22:24 +01:00
|
|
|
build = false
|
|
|
|
reason = 'only supported on Linux'
|
2017-10-17 13:43:57 +01:00
|
|
|
endif
|
2017-10-12 15:02:27 +01:00
|
|
|
if has_libnuma == 1
|
2021-04-20 11:22:24 +01:00
|
|
|
dpdk_conf.set10('RTE_LIBRTE_VHOST_NUMA', true)
|
2017-10-12 15:02:27 +01:00
|
|
|
endif
|
2019-10-25 00:08:22 +08:00
|
|
|
if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0'))
|
2021-04-20 11:22:24 +01:00
|
|
|
cflags += '-DVHOST_GCC_UNROLL_PRAGMA'
|
2019-10-25 00:08:22 +08:00
|
|
|
elif (toolchain == 'clang' and cc.version().version_compare('>=3.7.0'))
|
2021-04-20 11:22:24 +01:00
|
|
|
cflags += '-DVHOST_CLANG_UNROLL_PRAGMA'
|
2019-10-25 00:08:22 +08:00
|
|
|
elif (toolchain == 'icc' and cc.version().version_compare('>=16.0.0'))
|
2021-04-20 11:22:24 +01:00
|
|
|
cflags += '-DVHOST_ICC_UNROLL_PRAGMA'
|
2019-10-25 00:08:22 +08:00
|
|
|
endif
|
2021-04-20 11:22:24 +01:00
|
|
|
dpdk_conf.set('RTE_LIBRTE_VHOST_POSTCOPY', cc.has_header('linux/userfaultfd.h'))
|
2018-09-05 07:55:55 +08:00
|
|
|
cflags += '-fno-strict-aliasing'
|
2021-04-20 11:22:24 +01:00
|
|
|
sources = files(
|
|
|
|
'fd_man.c',
|
|
|
|
'iotlb.c',
|
|
|
|
'socket.c',
|
|
|
|
'vdpa.c',
|
|
|
|
'vhost.c',
|
|
|
|
'vhost_crypto.c',
|
|
|
|
'vhost_user.c',
|
|
|
|
'virtio_net.c',
|
|
|
|
)
|
|
|
|
headers = files(
|
|
|
|
'rte_vdpa.h',
|
|
|
|
'rte_vdpa_dev.h',
|
|
|
|
'rte_vhost.h',
|
|
|
|
'rte_vhost_async.h',
|
|
|
|
'rte_vhost_crypto.h',
|
|
|
|
)
|
2018-04-05 17:01:34 +01:00
|
|
|
deps += ['ethdev', 'cryptodev', 'hash', 'pci']
|