1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018-2021 Hisilicon Limited
6 reason = 'only supported on Linux'
10 if arch_subdir != 'x86' and arch_subdir != 'arm' or not dpdk_conf.get('RTE_ARCH_64')
12 reason = 'only supported on x86_64 and aarch64'
37 if arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
38 sources += files('hns3_rxtx_vec.c')
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']
49 if not (flag.startswith('-march=') or flag.startswith('-mcpu=') or flag.startswith('-mtune='))
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')