74b46340e2
Kernel v5.10 will introduce the ability to efficiently share a UMEM between AF_XDP sockets bound to different queue ids on the same or different devices. This patch integrates that functionality into the AF_XDP PMD. A PMD will attempt to share a UMEM with others if the shared_umem=1 vdev arg is set. UMEMs can only be shared across PMDs with the same mempool, up to a limited number of PMDs goverened by the size of the given mempool. Sharing UMEMs is not supported for non-zero-copy (aligned) mode. The benefit of sharing UMEM across PMDs is a saving in memory due to not having to register the UMEM multiple times. Throughput was measured to remain within 2% of the default mode (not sharing UMEM). A version of libbpf >= v0.2.0 is required and the appropriate pkg-config file for libbpf must be installed such that meson can determine the version. Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
21 lines
580 B
Meson
21 lines
580 B
Meson
# SPDX-License-Identifier: BSD-3-Clause
|
|
# Copyright(c) 2019 Intel Corporation
|
|
|
|
sources = files('rte_eth_af_xdp.c')
|
|
|
|
bpf_dep = dependency('libbpf', required: false)
|
|
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
|
|
bpf_ver_dep = dependency('libbpf', version : '>=0.2.0', required: false)
|
|
if bpf_ver_dep.found()
|
|
dpdk_conf.set('RTE_LIBRTE_AF_XDP_PMD_SHARED_UMEM', 1)
|
|
endif
|
|
else
|
|
build = false
|
|
reason = 'missing dependency, "libbpf"'
|
|
endif
|