Re: [RFC][Proposal] BPF Control MAP

Toke Høiland-Jørgensen <toke@...>

Saeed Mahameed <saeedm@...> writes:

In this proposal I am going to address the lack of a unified user API
for accessing and manipulating BPF system attributes, while this
proposal is generic and will work on any BPF subsystem (eBPF attach
points), I will mostly focus on XDP use cases.

So lately I started working on three different XDP open issues, namely
XDP statistic, XDP redirect and XDP meta-data, while the details of
these issues are not really relevant for the sake of this proposal, all
of them share one common problem: the lack of unified user interface to
manipulate and access their attributes.

1. Query XDP statistics.
2. XDP resource management, Setup XDP-redirect TX resources.
3. Setup and query XDP-metadata - (BTF data structure).

Jesper Brouer, explains some of these issues in details at:

Yes I considered, netlink, devlink, ethtool, sysctrl, etc .. but each
one of them has it's own drawback, they are networking specific and
will not serve the BPF general purpose.
The one concern I have with this is that it makes XDP configuration
different from regular networking configuration. One of the compelling
features of XDP is that it is less surprising than kernel offloads,
because that you can interface with it using the regular kernel tooling.
This is less the case if we're doing a BPF-specific thing...

Or to put it another way, in my mind XDP is a networking technology that
happens to use eBPF, more than it is an eBPF usage that happens to
process packets; and I think it would make more sense for the userspace
tooling to reflect this.

That being said, I do agree that there are some cool ideas in your
example, such as using BTF to express the statistics format, and the
automatic enumeration of objects.


Join to automatically receive all group messages.