net/virtio: add vectorized packed ring Rx
[dpdk.git] / drivers / net / virtio / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018 Intel Corporation
3
4 sources += files('virtio_ethdev.c',
5         'virtio_pci.c',
6         'virtio_rxtx.c',
7         'virtio_rxtx_simple.c',
8         'virtqueue.c')
9 deps += ['kvargs', 'bus_pci']
10
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'
22                         endif
23                         sources += files('virtio_rxtx_packed_avx.c')
24                 endif
25         endif
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')
31 endif
32
33 if is_linux
34         dpdk_conf.set('RTE_VIRTIO_USER', 1)
35
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')
41         deps += ['bus_vdev']
42 endif