1# SPDX-License-Identifier: BSD-3-Clause 2# Copyright(c) 2017-2018 Intel Corporation 3 4if not is_linux 5 build = false 6 reason = 'only supported on Linux' 7endif 8if has_libnuma == 1 9 dpdk_conf.set10('RTE_LIBRTE_VHOST_NUMA', true) 10endif 11if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0')) 12 cflags += '-DVHOST_GCC_UNROLL_PRAGMA' 13elif (toolchain == 'clang' and cc.version().version_compare('>=3.7.0')) 14 cflags += '-DVHOST_CLANG_UNROLL_PRAGMA' 15elif (toolchain == 'icc' and cc.version().version_compare('>=16.0.0')) 16 cflags += '-DVHOST_ICC_UNROLL_PRAGMA' 17endif 18dpdk_conf.set('RTE_LIBRTE_VHOST_POSTCOPY', 19 cc.has_header('linux/userfaultfd.h')) 20cflags += '-fno-strict-aliasing' 21sources = files('fd_man.c', 'iotlb.c', 'socket.c', 'vdpa.c', 22 'vhost.c', 'vhost_user.c', 23 'virtio_net.c', 'vhost_crypto.c') 24headers = files('rte_vhost.h', 'rte_vdpa.h', 'rte_vdpa_dev.h', 25 'rte_vhost_crypto.h', 'rte_vhost_async.h') 26deps += ['ethdev', 'cryptodev', 'hash', 'pci'] 27