1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018 Intel Corporation
6 reason = 'not supported on Windows'
13 'virtio_pci_ethdev.c',
16 'virtio_rxtx_simple.c',
19 deps += ['kvargs', 'bus_pci']
21 if arch_subdir == 'x86'
22 if not machine_args.contains('-mno-avx512f')
23 if cc.has_argument('-mavx512f') and cc.has_argument('-mavx512vl') and cc.has_argument('-mavx512bw')
24 cflags += ['-DCC_AVX512_SUPPORT']
25 virtio_avx512_lib = static_library('virtio_avx512_lib',
26 'virtio_rxtx_packed.c',
27 dependencies: [static_rte_ethdev,
28 static_rte_kvargs, static_rte_bus_pci],
29 include_directories: includes,
30 c_args: [cflags, '-mavx512f', '-mavx512bw', '-mavx512vl'])
31 objs += virtio_avx512_lib.extract_objects('virtio_rxtx_packed.c')
32 if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0'))
33 cflags += '-DVHOST_GCC_UNROLL_PRAGMA'
34 elif (toolchain == 'clang' and cc.version().version_compare('>=3.7.0'))
35 cflags += '-DVHOST_CLANG_UNROLL_PRAGMA'
36 elif (toolchain == 'icc' and cc.version().version_compare('>=16.0.0'))
37 cflags += '-DVHOST_ICC_UNROLL_PRAGMA'
41 sources += files('virtio_rxtx_simple_sse.c')
42 elif arch_subdir == 'ppc'
43 sources += files('virtio_rxtx_simple_altivec.c')
44 elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
45 sources += files('virtio_rxtx_packed.c')
46 sources += files('virtio_rxtx_simple_neon.c')
50 sources += files('virtio_user_ethdev.c',
51 'virtio_user/vhost_kernel.c',
52 'virtio_user/vhost_kernel_tap.c',
53 'virtio_user/vhost_user.c',
54 'virtio_user/vhost_vdpa.c',
55 'virtio_user/virtio_user_dev.c')