net/hns3: fix mailbox wait time
[dpdk.git] / drivers / net / hns3 / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018-2021 Hisilicon Limited
3
4 if not is_linux
5     build = false
6     reason = 'only supported on Linux'
7     subdir_done()
8 endif
9
10 if arch_subdir != 'x86' and arch_subdir != 'arm' or not dpdk_conf.get('RTE_ARCH_64')
11     build = false
12     reason = 'only supported on x86_64 and aarch64'
13     subdir_done()
14 endif
15
16 sources = files(
17         'hns3_cmd.c',
18         'hns3_dcb.c',
19         'hns3_intr.c',
20         'hns3_ethdev.c',
21         'hns3_ethdev_vf.c',
22         'hns3_fdir.c',
23         'hns3_flow.c',
24         'hns3_mbx.c',
25         'hns3_regs.c',
26         'hns3_rss.c',
27         'hns3_rxtx.c',
28         'hns3_stats.c',
29         'hns3_mp.c',
30         'hns3_tm.c',
31         'hns3_ptp.c',
32         'hns3_common.c',
33 )
34
35 deps += ['hash']
36
37 if arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
38     sources += files('hns3_rxtx_vec.c')
39
40     # compile SVE when:
41     # a. support SVE in minimum instruction set baseline
42     # b. it's not minimum instruction set, but compiler support
43     if dpdk_conf.has('RTE_HAS_SVE_ACLE')
44         sources += files('hns3_rxtx_vec_sve.c')
45     elif cc.has_argument('-march=armv8.2-a+sve') and cc.check_header('arm_sve.h')
46         cflags += ['-DRTE_HAS_SVE_ACLE=1']
47         sve_cflags = []
48         foreach flag: cflags
49             if not (flag.startswith('-march=') or flag.startswith('-mcpu=') or flag.startswith('-mtune='))
50                 sve_cflags += flag
51             endif
52         endforeach
53         hns3_sve_lib = static_library('hns3_sve_lib',
54                         'hns3_rxtx_vec_sve.c',
55                         dependencies: [static_rte_ethdev],
56                         include_directories: includes,
57                         c_args: [sve_cflags, '-march=armv8.2-a+sve'])
58         objs += hns3_sve_lib.extract_objects('hns3_rxtx_vec_sve.c')
59     endif
60 endif