test/bonding: fix RSS test when disable RSS
[dpdk.git] / drivers / net / i40e / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017 Intel Corporation
3
4 if arch_subdir == 'riscv'
5     build = false
6     reason = 'not supported on RISC-V'
7     subdir_done()
8 endif
9
10 cflags += ['-DPF_DRIVER',
11     '-DVF_DRIVER',
12     '-DINTEGRATED_VF',
13     '-DX722_A0_SUPPORT']
14
15 subdir('base')
16 objs = [base_objs]
17
18 sources = files(
19         'i40e_ethdev.c',
20         'i40e_rxtx.c',
21         'i40e_pf.c',
22         'i40e_fdir.c',
23         'i40e_flow.c',
24         'i40e_tm.c',
25         'i40e_hash.c',
26         'i40e_vf_representor.c',
27         'rte_pmd_i40e.c',
28 )
29
30 deps += ['hash']
31 includes += include_directories('base')
32
33 if arch_subdir == 'x86'
34     sources += files('i40e_rxtx_vec_sse.c')
35
36     if is_windows and cc.get_id() != 'clang'
37         cflags += ['-fno-asynchronous-unwind-tables']
38     endif
39
40     # compile AVX2 version if either:
41     # a. we have AVX supported in minimum instruction set baseline
42     # b. it's not minimum instruction set, but supported by compiler
43     if cc.get_define('__AVX2__', args: machine_args) != ''
44         cflags += ['-DCC_AVX2_SUPPORT']
45         sources += files('i40e_rxtx_vec_avx2.c')
46     elif cc.has_argument('-mavx2')
47         cflags += ['-DCC_AVX2_SUPPORT']
48         i40e_avx2_lib = static_library('i40e_avx2_lib',
49                 'i40e_rxtx_vec_avx2.c',
50                 dependencies: [static_rte_ethdev,
51                     static_rte_kvargs, static_rte_hash],
52                 include_directories: includes,
53                 c_args: [cflags, '-mavx2'])
54         objs += i40e_avx2_lib.extract_objects('i40e_rxtx_vec_avx2.c')
55     endif
56
57     i40e_avx512_cpu_support = (
58         cc.get_define('__AVX512F__', args: machine_args) != '' and
59         cc.get_define('__AVX512BW__', args: machine_args) != '')
60
61     i40e_avx512_cc_support = (
62         not machine_args.contains('-mno-avx512f') and
63         cc.has_argument('-mavx512f') and
64         cc.has_argument('-mavx512bw'))
65
66     if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true
67         cflags += ['-DCC_AVX512_SUPPORT']
68         avx512_args = [cflags, '-mavx512f', '-mavx512bw']
69         if cc.has_argument('-march=skylake-avx512')
70             avx512_args += '-march=skylake-avx512'
71         endif
72         i40e_avx512_lib = static_library('i40e_avx512_lib',
73                 'i40e_rxtx_vec_avx512.c',
74                 dependencies: [static_rte_ethdev,
75                     static_rte_kvargs, static_rte_hash],
76                 include_directories: includes,
77                 c_args: avx512_args)
78         objs += i40e_avx512_lib.extract_objects('i40e_rxtx_vec_avx512.c')
79     endif
80 elif arch_subdir == 'ppc'
81        sources += files('i40e_rxtx_vec_altivec.c')
82 elif arch_subdir == 'arm'
83        sources += files('i40e_rxtx_vec_neon.c')
84 endif
85
86 headers = files('rte_pmd_i40e.h')