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