I am currently trying to get the AF_XDP-Tutorial running from here: https://github.com/xdp-project/xdp-tutorial/tree/master/advanced03-AF_XDP
I was able to compile it but if I try to put the xdp-code into the kernel via:
sudo ./af_xdp_user --dev veth-basic02 --force
I get this error:
ERROR: Can't setup AF_XDP socket "Operation not permitted"
Then I checked for the Kernel flags
CONFIG_BPF=y
CONFIG_BPF_SYSCALL=y
CONFIG_XDP_SOCKETS=y
in /boot/config-4.18.0-25-generic
and they are all there.
So as a next step, I tried to compile the program not with the libbpf
-submodule in the xdp-tutorial
repository, but with the latest version from here: https://github.com/libbpf/libbpf/tree/master/src
But now, if I try to compile the program, I get this output:
cc -Wall -I../libbpf/src/build/usr/include/ -g -I../headers/ -L../libbpf/src -o af_xdp_user ../common/common_libbpf.o ../common/common_params.o ../common/common_user_bpf_xdp.o \ af_xdp_user.c -l:libbpf.a -lelf -lpthread /usr/bin/ld: ../libbpf/src/libbpf.a(libbpf.o): undefined reference to symbol 'gzopen64@@ZLIB_1.2.3.3' /usr/bin/ld: //lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line
Anyone able to help?
Edit:
Output of sudo strace ./af_xdp_user --dev veth-basic02 --force
:
Edit_2: Since the creation of this post I upgraded to kernel 5.3.0-28
- but unfortunately nothing has changed