net/iavf: fix QFI fields of GTPU UL/DL for flow director
[dpdk.git] / drivers / net / iavf / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
3
4 if is_windows
5     build = false
6     reason = 'not supported on Windows'
7     subdir_done()
8 endif
9
10 cflags += ['-Wno-strict-aliasing']
11
12 includes += include_directories('../../common/iavf')
13 deps += ['common_iavf']
14
15 sources = files(
16         'iavf_ethdev.c',
17         'iavf_rxtx.c',
18         'iavf_vchnl.c',
19         'iavf_generic_flow.c',
20         'iavf_fdir.c',
21         'iavf_hash.c',
22         'iavf_tm.c',
23 )
24
25 if arch_subdir == 'x86'
26     sources += files('iavf_rxtx_vec_sse.c')
27
28     # compile AVX2 version if either:
29     # a. we have AVX supported in minimum instruction set baseline
30     # b. it's not minimum instruction set, but supported by compiler
31     if cc.get_define('__AVX2__', args: machine_args) != ''
32         cflags += ['-DCC_AVX2_SUPPORT']
33         sources += files('iavf_rxtx_vec_avx2.c')
34     elif cc.has_argument('-mavx2')
35         cflags += ['-DCC_AVX2_SUPPORT']
36         iavf_avx2_lib = static_library('iavf_avx2_lib',
37                 'iavf_rxtx_vec_avx2.c',
38                 dependencies: [static_rte_ethdev,
39                     static_rte_kvargs, static_rte_hash],
40                 include_directories: includes,
41                 c_args: [cflags, '-mavx2'])
42         objs += iavf_avx2_lib.extract_objects('iavf_rxtx_vec_avx2.c')
43     endif
44
45     iavf_avx512_cpu_support = (
46         cc.get_define('__AVX512F__', args: machine_args) != '' and
47         cc.get_define('__AVX512BW__', args: machine_args) != '')
48
49     iavf_avx512_cc_support = (
50         not machine_args.contains('-mno-avx512f') and
51         cc.has_argument('-mavx512f') and
52         cc.has_argument('-mavx512bw'))
53
54     if iavf_avx512_cpu_support == true or iavf_avx512_cc_support == true
55         cflags += ['-DCC_AVX512_SUPPORT']
56         avx512_args = [cflags, '-mavx512f', '-mavx512bw']
57         if cc.has_argument('-march=skylake-avx512')
58             avx512_args += '-march=skylake-avx512'
59         endif
60         iavf_avx512_lib = static_library('iavf_avx512_lib',
61                 'iavf_rxtx_vec_avx512.c',
62                 dependencies: [static_rte_ethdev,
63                     static_rte_kvargs, static_rte_hash],
64                 include_directories: includes,
65                 c_args: avx512_args)
66         objs += iavf_avx512_lib.extract_objects('iavf_rxtx_vec_avx512.c')
67     endif
68 endif
69
70 headers = files('rte_pmd_iavf.h')