]> git.droids-corp.org - dpdk.git/commit
net/af_xdp: use libxdp if available
authorCiara Loftus <ciara.loftus@intel.com>
Fri, 28 Jan 2022 09:50:29 +0000 (09:50 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 1 Feb 2022 10:08:00 +0000 (11:08 +0100)
commitfa4dfda5fe9c3483944955986b60f4d536c4a8bc
treee8c974705d0ae579c4cc35504eee80c6d991f8f3
parent39ddd5d1895e72ba2bc974eddbc12a3135639ed1
net/af_xdp: use libxdp if available

AF_XDP support is deprecated in libbpf since v0.7.0 [1]. The libxdp library
now provides the functionality which once was in libbpf and which the
AF_XDP PMD relies on. This commit updates the AF_XDP meson build to use the
libxdp library if a version >= v1.2.2 is available. If it is not available,
only versions of libbpf prior to v0.7.0 are allowed, as they still contain
the required AF_XDP functionality.

libbpf still remains a dependency even if libxdp is present, as we use
libbpf APIs for program loading.

The minimum required kernel version for libxdp for use with AF_XDP is v5.3.
For the library to be fully-featured, a kernel v5.10 or newer is
recommended. The full compatibility information can be found in the libxdp
README.

v1.2.2 of libxdp includes an important fix required for linking with DPDK
which is why this version or greater is required. Meson uses pkg-config to
verify the version of libxdp on the system, so it is necessary that the
library is discoverable using pkg-config in order for the PMD to use it. To
verify this, you can run: pkg-config --modversion libxdp

[1] https://github.com/libbpf/libbpf/commit/277846bc6c15

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
doc/guides/nics/af_xdp.rst
doc/guides/rel_notes/release_22_03.rst
drivers/net/af_xdp/compat.h
drivers/net/af_xdp/meson.build
drivers/net/af_xdp/rte_eth_af_xdp.c