2020-06-18 16:55:50 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
# Copyright(c) 2019 Intel Corporation
|
|
|
|
|
|
|
|
sources = files('rte_eth_af_xdp.c')
|
|
|
|
|
2022-09-02 04:40:05 +00:00
|
|
|
bpf_dep = dependency('libbpf', required: false, method: 'pkg-config')
|
2020-06-18 16:55:50 +00:00
|
|
|
if not bpf_dep.found()
|
|
|
|
bpf_dep = cc.find_library('bpf', required: false)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if bpf_dep.found() and cc.has_header('bpf/xsk.h') and cc.has_header('linux/if_xdp.h')
|
|
|
|
ext_deps += bpf_dep
|
2022-09-02 04:40:05 +00:00
|
|
|
bpf_ver_dep = dependency('libbpf', version : '>=0.2.0',
|
|
|
|
required: false, method: 'pkg-config')
|
2021-02-05 08:48:47 +00:00
|
|
|
if bpf_ver_dep.found()
|
|
|
|
dpdk_conf.set('RTE_LIBRTE_AF_XDP_PMD_SHARED_UMEM', 1)
|
|
|
|
endif
|
2020-06-18 16:55:50 +00:00
|
|
|
else
|
|
|
|
build = false
|
|
|
|
reason = 'missing dependency, "libbpf"'
|
|
|
|
endif
|