xdp-project / xdp-tools

Utilities and example programs for use with XDP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing samples/bpf/xdpsock_user.c.

huang195 opened this issue · comments

There are a few references to the file samples/bpf/xdpsock_user.c. in the README.md file. I cannot find the file in the kernel source tree. Is the file renamed or am I not looking at the right kernel branch?

The example was using libbpf and its support for XDP has been deprecated. The patch can be found here: https://lore.kernel.org/bpf/20220630093717.8664-1-magnus.karlsson@gmail.com/

It can still be found in previous kernel versions: https://github.com/torvalds/linux/blob/v5.19/samples/bpf/xdpsock_user.c

I am using it with the latest libxdp version and it seems to still work correctly. (The l2fwd program seems to have an issue with reserving TX slots but it may be an issue on my side)