Open sevagh opened 5 years ago
I'm using Fedora 30 with kernel 5.2.7-200.fc30.x86_64
.
Sevag Hanssian notifications@github.com writes:
I'm using Fedora 30 with kernel
5.2.7-200.fc30.x86_64
.
Yeah, the "locked memory" limit is a known issue on fedora. We already raise it in the testenv.sh script: https://github.com/xdp-project/xdp-tutorial/blob/master/testenv/testenv.sh#L69
Not sure if we should be setting it in the loader instead; feels a bit iffy to just remove the limit entirely. But on the other hand, iproute2 seems to do exactly that... :/
Not sure if we should be setting it in the loader instead; feels a bit iffy to just remove the limit entirely. But on the other hand, iproute2 seems to do exactly that... :/
I think RLIM_INFINITY
is a bad value and example, if anything we should set a reasonable value instead, as an example. If everybody want to use "unlimited" then we should send a kernel patch and remove this memory limit protection feature.
That reminds me that the kernel feedback -EPERM
sucks: Operation not permitted
But upstream Alexei would not allow me to change this to -ENOMEM
: Not enough space/cannot allocate memory
. As this is now UABI.
Jesper Dangaard Brouer notifications@github.com writes:
Not sure if we should be setting it in the loader instead; feels a bit iffy to just remove the limit entirely. But on the other hand, iproute2 seems to do exactly that... :/
I think
RLIM_INFINITY
is a bad value and example, if anything we should set a reasonable value instead, as an example. If everybody want to use "unlimited" then we should send a kernel patch and remove this memory limit protection feature.
Yeah, that's my feeling as well. Nonetheless:
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/tree/lib/bpf.c#n1365
Thanks for confirming. I'll defer to the maintainers' opinions on the change I made.
On the other hand, as a beginner stepping through the tutorial, maybe https://github.com/xdp-project/xdp-tutorial/blob/master/setup_dependencies.org is a good place to mention this Fedora limitation?
Hello. When following the tutorial, in basic 01, I can load
xdp_pass_kern.o
using the providedip
commands:With the
xdp_pass_user
program, I was getting a permission denied error:I found this workaround by searching the error message: https://www.spinics.net/lists/netdev/msg548481.html
Applied, it looks like:
After recompiling,
xdp_pass_user
works: