Re: [PATCH bpf-next 1/3] libbpf: xsk: use bpf_link
From: Dan Siemon <hidden>
Date: 2021-02-17 02:24:01
Also in:
netdev
On Mon, 2021-02-15 at 22:38 +0100, Toke Høiland-Jørgensen wrote:
The idea is to keep libbpf focused on bpf, and move the AF_XDP stuff to libxdp (so the socket stuff in xsk.h). We're adding the existing code wholesale, and keeping API compatibility during the move, so all that's needed is adding -lxdp when compiling. And obviously the existing libbpf code isn't going anywhere until such a time as there's a general backwards compatibility-breaking deprecation in libbpf (which I believe Andrii is planning to do in an upcoming and as-of-yet unannounced v1.0 release).
I maintain a Rust binding to the AF_XDP parts of libbpf [1][2]. On the chance that more significant changes can be entertained in the switch to libxdp... The fact that many required functions like the ring access functions exist only in xsk.h makes building a binding more difficult because we need to wrap it with an extra C function [3]. From that perspective, it would be great if those could move to xsk.c. [1] - https://github.com/aterlo/afxdp-rs [2] - https://github.com/alexforster/libbpf-sys [3] - https://github.com/alexforster/libbpf-sys/blob/master/bindings.c