xdp-project / xdp-tutorial

XDP tutorial
2.49k stars 579 forks source link

advanced03-AF_XDP: load file fails on recent Linux kernels #288

Open uablrek opened 2 years ago

uablrek commented 2 years ago

Some time around linux-5.13 loading fails with;

# ./af_xdp_user -d eth1 --filename af_xdp_kern.o
libbpf: Netlink-based XDP prog detected, please unload it in order to launch AF_XDP prog
ERROR: Can't setup AF_XDP socket "Invalid argument"
uablrek commented 2 years ago

Start without --filename works;

# ./af_xdp_user -d eth1
AF_XDP RX:             0 pkts (         0 pps)           0 Kbytes (     0 Mbits/s) period:2.000275
       TX:             0 pkts (         0 pps)           0 Kbytes (     0 Mbits/s) period:2.000275

AF_XDP RX:             0 pkts (         0 pps)           0 Kbytes (     0 Mbits/s) period:2.003799
       TX:             0 pkts (         0 pps)           0 Kbytes (     0 Mbits/s) period:2.003799