net/virtio: move vring alignment to generic header
[dpdk.git] / drivers / net / ice / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018 Intel Corporation
3
4 if is_windows
5         build = false
6         reason = 'not supported on Windows'
7         subdir_done()
8 endif
9
10 subdir('base')
11 objs = [base_objs]
12
13 sources = files(
14         'ice_ethdev.c',
15         'ice_rxtx.c',
16         'ice_switch_filter.c',
17         'ice_generic_flow.c',
18         'ice_fdir_filter.c',
19         'ice_hash.c',
20         'ice_acl_filter.c'
21         )
22
23 deps += ['hash', 'net', 'common_iavf']
24 includes += include_directories('base', '../../common/iavf')
25
26 if arch_subdir == 'x86'
27         sources += files('ice_rxtx_vec_sse.c')
28
29         # compile AVX2 version if either:
30         # a. we have AVX supported in minimum instruction set baseline
31         # b. it's not minimum instruction set, but supported by compiler
32         if cc.get_define('__AVX2__', args: machine_args) != ''
33                 sources += files('ice_rxtx_vec_avx2.c')
34         elif cc.has_argument('-mavx2')
35                 ice_avx2_lib = static_library('ice_avx2_lib',
36                                 'ice_rxtx_vec_avx2.c',
37                                 dependencies: [static_rte_ethdev,
38                                         static_rte_kvargs, static_rte_hash],
39                                 include_directories: includes,
40                                 c_args: [cflags, '-mavx2'])
41                 objs += ice_avx2_lib.extract_objects('ice_rxtx_vec_avx2.c')
42         endif
43
44         ice_avx512_cpu_support = (
45                 cc.get_define('__AVX512F__', args: machine_args) != '' and
46                 cc.get_define('__AVX512BW__', args: machine_args) != '')
47
48         ice_avx512_cc_support = (
49                 not machine_args.contains('-mno-avx512f') and
50                 cc.has_argument('-mavx512f') and
51                 cc.has_argument('-mavx512bw'))
52
53         if ice_avx512_cpu_support == true or ice_avx512_cc_support == true
54                 cflags += ['-DCC_AVX512_SUPPORT']
55                 avx512_args = [cflags, '-mavx512f', '-mavx512bw']
56                 if cc.has_argument('-march=skylake-avx512')
57                         avx512_args += '-march=skylake-avx512'
58                 endif
59                 ice_avx512_lib = static_library('ice_avx512_lib',
60                                 'ice_rxtx_vec_avx512.c',
61                                 dependencies: [static_rte_ethdev,
62                                         static_rte_kvargs, static_rte_hash],
63                                 include_directories: includes,
64                                 c_args: avx512_args)
65                 objs += ice_avx512_lib.extract_objects('ice_rxtx_vec_avx512.c')
66         endif
67 endif
68
69 sources += files('ice_dcf.c',
70                  'ice_dcf_vf_representor.c',
71                  'ice_dcf_ethdev.c',
72                  'ice_dcf_parent.c')
73
74 headers = files('rte_pmd_ice.h')