1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2019 Intel Corporation
6 reason = 'not supported on Windows'
10 sources = files('rte_eth_af_xdp.c')
12 bpf_dep = dependency('libbpf', required: false, method: 'pkg-config')
13 if not bpf_dep.found()
14 bpf_dep = cc.find_library('bpf', required: false)
17 if bpf_dep.found() and cc.has_header('bpf/xsk.h') and cc.has_header('linux/if_xdp.h')
19 # check for libbpf shared umem APIs
20 bpf_ver_dep = dependency('libbpf', version : '>=0.2.0',
21 required: false, method: 'pkg-config')
22 if bpf_ver_dep.found()
23 dpdk_conf.set('RTE_LIBRTE_AF_XDP_PMD_SHARED_UMEM', 1)
25 # check for libbpf bpf link support
26 bpf_link_dep = dependency('libbpf', version : '>=0.4.0',
27 required: false, method: 'pkg-config')
28 if bpf_link_dep.found()
29 dpdk_conf.set('RTE_LIBRTE_AF_XDP_PMD_BPF_LINK', 1)
33 reason = 'missing dependency, "libbpf"'