1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018 Intel Corporation
4 sources += files('virtio_ethdev.c',
7 'virtio_rxtx_simple.c',
9 deps += ['kvargs', 'bus_pci']
11 if arch_subdir == 'x86'
12 if not machine_args.contains('-mno-avx512f')
13 if cc.has_argument('-mavx512f') and cc.has_argument('-mavx512vl') and cc.has_argument('-mavx512bw')
14 cflags += ['-mavx512f', '-mavx512bw', '-mavx512vl']
15 cflags += ['-DCC_AVX512_SUPPORT']
16 if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0'))
17 cflags += '-DVHOST_GCC_UNROLL_PRAGMA'
18 elif (toolchain == 'clang' and cc.version().version_compare('>=3.7.0'))
19 cflags += '-DVHOST_CLANG_UNROLL_PRAGMA'
20 elif (toolchain == 'icc' and cc.version().version_compare('>=16.0.0'))
21 cflags += '-DVHOST_ICC_UNROLL_PRAGMA'
23 sources += files('virtio_rxtx_packed_avx.c')
26 sources += files('virtio_rxtx_simple_sse.c')
27 elif arch_subdir == 'ppc'
28 sources += files('virtio_rxtx_simple_altivec.c')
29 elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
30 sources += files('virtio_rxtx_simple_neon.c')
34 dpdk_conf.set('RTE_VIRTIO_USER', 1)
36 sources += files('virtio_user_ethdev.c',
37 'virtio_user/vhost_kernel.c',
38 'virtio_user/vhost_kernel_tap.c',
39 'virtio_user/vhost_user.c',
40 'virtio_user/virtio_user_dev.c')