2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright(c) 2019-2020 Intel Corporation
5 if not is_linux or not dpdk_conf.has('RTE_ARCH_X86_64')
7 reason = 'only supported on x86_64 Linux'
17 'pf/base/dlb2_resource.c',
22 # compile AVX512 version if:
23 # we are building 64-bit binary (checked above) AND binutils
24 # can generate proper code
28 # compile AVX512 version if either:
29 # a. we have AVX512VL supported in minimum instruction set
31 # b. it's not minimum instruction set, but supported by
34 # in former case, just add avx512 C file to files list
35 # in latter case, compile c file to static lib, using correct
36 # compiler flags, and then have the .o file from static lib
37 # linked into main lib.
39 # check if all required flags already enabled (variant a).
40 dlb2_avx512_on = false
41 if cc.get_define(f, args: machine_args) == '__AVX512VL__'
45 if dlb2_avx512_on == true
47 sources += files('dlb2_avx512.c')
48 cflags += '-DCC_AVX512_SUPPORT'
50 elif cc.has_multi_arguments('-mavx512vl')
52 cflags += '-DCC_AVX512_SUPPORT'
53 avx512_tmplib = static_library('avx512_tmp',
55 dependencies: [static_rte_eal, static_rte_eventdev],
56 c_args: cflags + ['-mavx512vl'])
57 objs += avx512_tmplib.extract_objects('dlb2_avx512.c')
59 sources += files('dlb2_sse.c')
62 sources += files('dlb2_sse.c')
65 headers = files('rte_pmd_dlb2.h')
67 deps += ['mbuf', 'mempool', 'ring', 'pci', 'bus_pci']