[PATCH] net/af_xdp: make compatible with libbpf v0.8.0

Kevin Traynor ktraynor at redhat.com
Tue Dec 20 15:05:06 CET 2022


On 24/06/2022 11:23, Ciara Loftus wrote:
> libbpf v0.8.0 deprecates the bpf_get_link_xdp_id and bpf_set_link_xdp_fd
> functions. Use meson to detect if libbpf >= v0.7.0 is linked and if so, use
> the recommended replacement functions bpf_xdp_query_id, bpf_xdp_attach
> and bpf_xdp_detach which are available to use since libbpf v0.7.0.
> 
> Also prevent linking with libbpf versions > v0.8.0.
> 
> Signed-off-by: Ciara Loftus <ciara.loftus at intel.com>

Hi Andrew/Qi (assuming Ciara is still out of office),

I am seeing a similar issue [1] on 21.11 branch with Fedora 37
(libbpf-0.8.0-2.fc37.x86_64 and libxdp-1.2.6-1.fc37.x86_64).

This patch alone won't apply as there are other dependencies. Looking at 
the commits in main branch, it seems like I could take all these [2] to 
resolve the issue. With these cherry-picked the build warnings on Fedora 
37 are removed.

It's a bit late to take these for DPDK 21.11.3 as I intend to release 
later today/tomorrow, so it can be resolved for DPDK 21.11.4.

Do the commits below look ok for backport? Main branch might be able to 
demand user uses new libbpf/libxdp versions etc, but with stable we 
never want to break the users existing setup when they upgrade from 
2X.11.n to 2X.11.n+1.

Let me know what you think?

thanks,
Kevin.

[1] https://paste.centos.org/view/e4eec764
[2]
1eb1846b1a net/af_xdp: make compatible with libbpf 0.8.0
5ff3dbe6ce net/af_xdp: add log on XDP program removal failures
0ed0bc3834 net/af_xdp: avoid version-based check for program load
e024c7e838 net/af_xdp: avoid version-based check for shared UMEM
f76dc44ded net/af_xdp: make clear which libxdp version is required
50b855fc47 net/af_xdp: move XDP library presence flag setting



More information about the dev mailing list