test/bonding: fix RSS test when disable RSS
[dpdk.git] / drivers / event / dlb2 / meson.build
1
2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright(c) 2019-2020 Intel Corporation
4
5 if not is_linux or not dpdk_conf.has('RTE_ARCH_X86_64')
6         build = false
7         reason = 'only supported on x86_64 Linux'
8         subdir_done()
9 endif
10
11 sources = files(
12         'dlb2.c',
13         'dlb2_iface.c',
14         'dlb2_xstats.c',
15         'pf/dlb2_main.c',
16         'pf/dlb2_pf.c',
17         'pf/base/dlb2_resource.c',
18         'rte_pmd_dlb2.c',
19         'dlb2_selftest.c',
20 )
21
22 # compile AVX512 version if:
23 # we are building 64-bit binary (checked above) AND binutils
24 # can generate proper code
25
26 if binutils_ok
27
28     # compile AVX512 version if either:
29     # a. we have AVX512VL supported in minimum instruction set
30     #    baseline
31     # b. it's not minimum instruction set, but supported by
32     #    compiler
33     #
34     # in former case, just add avx512 C file to files list
35     # in latter case, compile c file to static lib, using correct
36     # compiler flags, and then have the .o file from static lib
37     # linked into main lib.
38
39     # check if all required flags already enabled (variant a).
40     dlb2_avx512_on = false
41     if cc.get_define(f, args: machine_args) == '__AVX512VL__'
42         dlb2_avx512_on = true
43     endif
44
45     if dlb2_avx512_on == true
46
47         sources += files('dlb2_avx512.c')
48         cflags += '-DCC_AVX512_SUPPORT'
49
50     elif cc.has_multi_arguments('-mavx512vl')
51
52         cflags += '-DCC_AVX512_SUPPORT'
53         avx512_tmplib = static_library('avx512_tmp',
54                                'dlb2_avx512.c',
55                                dependencies: [static_rte_eal, static_rte_eventdev],
56                                c_args: cflags + ['-mavx512vl'])
57         objs += avx512_tmplib.extract_objects('dlb2_avx512.c')
58     else
59         sources += files('dlb2_sse.c')
60     endif
61 else
62         sources += files('dlb2_sse.c')
63 endif
64
65 headers = files('rte_pmd_dlb2.h')
66
67 deps += ['mbuf', 'mempool', 'ring', 'pci', 'bus_pci']