Closed stevelorenz closed 3 years ago
Not yet, unfortunately; the required support is still missing from the kernel. I just got back from vacation this week, and finally getting this fixed is near the top of my list. I'll update this issue when this lands in the kernel.
Note, however, that if you just want to monitor the traffic, you can probably just use the same mechanism that xdpdump uses to attach to an existing XDP program. This should work on a 5.8 kernel - you can just try running xdpdump while that other program is attached and see if it works; then look at the xdpdump source for how it does this :)
Thanks so much for your helpful response :+1: . I will check the xdpdump
source. I will put you (as the XDP expert) in the acknowledgement of my thesis :stuck_out_tongue_winking_eye: . Best wishes for your todo list and look forward to the new kernel.
Zuo Xiang notifications@github.com writes:
Thanks so much for your helpful response :+1: . I will check the
xdpdump
source. I will put you (as the XDP expert) in the acknowledgement of my thesis :stuck_out_tongue_winking_eye: . Best wishes for your todo list and look forward to the new kernel.
You're welcome - and thanks! Good luck with your thesis!
Zuo Xiang notifications@github.com writes: Thanks so much for your helpful response +1 . I will check the
xdpdump
source. I will put you (as the XDP expert) in the acknowledgement of my thesis stuck_out_tongue_winking_eye . Best wishes for your todo list and look forward to the new kernel. You're welcome - and thanks! Good luck with your thesis!
May I get some enlightening tips from the expert for one issue when I updated xdp-tools
from the v0.0.3
to v1.0.0
? All programs get compiled without any issues :+1:. Unfortunately when I try to use the xdp-loader
to load the program, I get the following error about "Argument list too long". I have tried ulimit -s unlimited
and it still failed.
Current rlimit 67108864 already >= minimum 1048576
Loading 1 files on interface 'eth0'.
XDP program 0: Run prio: 50. Chain call actions: XDP_PASS
libxdp: Failed to load program xdp_prog_pass: Argument list too long
Couldn't attach XDP program on iface 'eth0': Argument list too long(-7)
5.4.0-42
Thanks so much for your help.
Hmm, not sure why you'd get that error exactly (could you try running with '-vv' to get some more debug output)?
However, there have been some issues with extension programs not being equivalent with the main programs which may be what you're hitting; that has only just been fixed in the kernel in the latest bpf-next tree, so if that is what you are hitting, you'll have to upgrade your kernel I'm afraid...
Hmm, not sure why you'd get that error exactly (could you try running with '-vv' to get some more debug output)? However, there have been some issues with extension programs not being equivalent with the main programs which may be what you're hitting; that has only just been fixed in the kernel in the latest bpf-next tree, so if that is what you are hitting, you'll have to upgrade your kernel I'm afraid...
The output of -vv
:
I grepped and assume the error happens in xdp_multiprog__link_prog
function in libxdp.c
. Maybe this requires the update to the latest bpf-next
tree. I'll update the kernel (if required) after getting all evalution plots for a paper :see_no_evil:. Thanks so much for your help :+1: .
Yeah, this sounds like you just need an older kernel. I'll update the error message to be more helpful. Eventually I also want to add backwards compatibility for older kernels, but haven't gotten around to that yet...
As of commit 4e73b130273529c9f56c9a4837e3b28c40125ca9, it is now possible to add additional XDP programs to an existing one, as long as you're a 5.10 kernel, and everything was loaded with libxdp. We should also be handling fallback on older kernels better now.
So closing this issue - please reopen if you still experience problems.
As of commit 4e73b13, it is now possible to add additional XDP programs to an existing one, as long as you're a 5.10 kernel, and everything was loaded with libxdp. We should also be handling fallback on older kernels better now.
So closing this issue - please reopen if you still experience problems.
Thanks so much for your reply :+1:. I'll update my kernel to 5.10 for tests soon. Have a nice day !
Dear XDP developers,
Thanks so much for your work. May I ask about the possibility to try attaching/appending another XDP program to an already-attached list of programs or replacing an attached XDP program? I am currently developing a XDP-based traffic monitoring algorithm (as a PhD student :wink: ). I wrote the XDP program but face the problem when I want to integrate it with OVS's AF_XDP datapath and DPDK's AF_XDP PMD. Both of them use the
static int xsk_setup_xdp_prog(struct xsk_socket *xsk)
function (provided bylibbpf
) to setup the AF_XDP socket and there is a "dummy" built-in XDP program be loaded inside this function (by callingxsk_load_xdp_prog()
function). Then I can not attach my monitor XDP program easily on the sameveth
interface. This limitation makes it difficult to test my approach using OVS AF_XDP directly. I did some workarounds (write my own simple "switch" using XDP) but it would be great if the additional XDP program can be attached. I see in the README oflibxdp
that:Is it possible to use this feature in the kernel version 5.8? Or I can test this feature by compiling the kernel source from a special testing repo? Thanks so much for your patience and answer.
With best regards,
Zuo Xiang