-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XDP programs are accounted to xdp-dispatcher #15
Comments
@hhoffstaette, could you paste the output of |
Here you go:
|
Sorry for the naming confusion. The CLI tool is called xdp-loader, whereas the XDP manager is called xdp-dispatcher, which is an XDP program itself, see here
|
I think the problem here is that XDP pipelines are "not really" individual programs, but I'm not familiar enough with the internals and eBPF statistics mechanism, hence the question. |
Ok, this type of eBPF pattern is new to me. To the Kernel, this will look like just loading one XDP app. At first glance, it seems like the libxdp library loads each individual XDP program as an This is where the stats we use are incremented by the Kernel when a BPF program exits. It appears to me that it's not doing that for these I'm very curious about this, I'll dig into the library a bit more to understand it. |
Thanks! If this turns out to be impossible at the moment we might need to open an issue in xdp-tools and see what Toke thinks. |
The dispatcher created by libxdp (used by So when using libxdp and the dispatcher, there's a single XDP program (the dispatcher) and each additional user program will be an EXT type eBPF program attached to the dispatcher. A bit more context on this: |
@mscastanho, thanks for the additional context. It appears to me that these EXT type programs do not go through the bpf/trampoline.c path I linked above, and thus, don't get individual performance statistics. If that is the case, then a Kernel patch would be required to enable stats for them. I'll verify that's the limiting factor here and investigate the feasibility of this. |
@hhoffstaette could you attach an example libxdp app that I can use to verify a few things? |
My only "production" app (a simple ethernet frame filter) is for hardware that you certainly do not have, but there are many examples around:
I hope this helps. |
I started a thread in the BPF mailing list to discuss this limiation https://lore.kernel.org/bpf/20240407052135.n3vwjrhw22kjehrh@ubuntu/T/#u |
Thanks for bpftop! I gave it a try and saw that XDP programs - which are managed by something called xdp-dispatcher - are not accounted indiviually, but rather to the xdp-dispatcher.
Is there a way to distinguish BPF statistics between individual XDP programs, or is this something that would have to be fixed in XDP?
The text was updated successfully, but these errors were encountered: