1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017 Intel Corporation
4 cflags += ['-DPF_DRIVER',
21 'i40e_vf_representor.c',
26 includes += include_directories('base')
28 if arch_subdir == 'x86'
29 dpdk_conf.set('RTE_LIBRTE_I40E_INC_VECTOR', 1)
30 sources += files('i40e_rxtx_vec_sse.c')
32 # compile AVX2 version if either:
33 # a. we have AVX supported in minimum instruction set baseline
34 # b. it's not minimum instruction set, but supported by compiler
35 if cc.get_define('__AVX2__', args: machine_args) != ''
36 cflags += ['-DCC_AVX2_SUPPORT']
37 sources += files('i40e_rxtx_vec_avx2.c')
38 elif cc.has_argument('-mavx2')
39 cflags += ['-DCC_AVX2_SUPPORT']
40 i40e_avx2_lib = static_library('i40e_avx2_lib',
41 'i40e_rxtx_vec_avx2.c',
42 dependencies: [static_rte_ethdev,
43 static_rte_kvargs, static_rte_hash],
44 include_directories: includes,
45 c_args: [cflags, '-mavx2'])
46 objs += i40e_avx2_lib.extract_objects('i40e_rxtx_vec_avx2.c')
49 i40e_avx512_cpu_support = (
50 cc.get_define('__AVX512F__', args: machine_args) != '' and
51 cc.get_define('__AVX512BW__', args: machine_args) != '')
53 i40e_avx512_cc_support = (
54 not machine_args.contains('-mno-avx512f') and
55 cc.has_argument('-mavx512f') and
56 cc.has_argument('-mavx512bw'))
58 if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true
59 cflags += ['-DCC_AVX512_SUPPORT']
60 avx512_args = [cflags, '-mavx512f', '-mavx512bw']
61 if cc.has_argument('-march=skylake-avx512')
62 avx512_args += '-march=skylake-avx512'
64 i40e_avx512_lib = static_library('i40e_avx512_lib',
65 'i40e_rxtx_vec_avx512.c',
66 dependencies: [static_rte_ethdev,
67 static_rte_kvargs, static_rte_hash],
68 include_directories: includes,
70 objs += i40e_avx512_lib.extract_objects('i40e_rxtx_vec_avx512.c')
72 elif arch_subdir == 'ppc'
73 dpdk_conf.set('RTE_LIBRTE_I40E_INC_VECTOR', 1)
74 sources += files('i40e_rxtx_vec_altivec.c')
75 elif arch_subdir == 'arm'
76 dpdk_conf.set('RTE_LIBRTE_I40E_INC_VECTOR', 1)
77 sources += files('i40e_rxtx_vec_neon.c')
80 headers = files('rte_pmd_i40e.h')