Conversation
https://packages.debian.org/search?keywords=llvm-strip&searchon=names&suite=all§ion=all https://packages.ubuntu.com/search?keywords=llvm-strip&searchon=names&suite=all§ion=all Both Debian and Ubuntu current versions don't have llvm-strip package and llvm seems to ship llvm-strip command. Signed-off-by: Yoshiki Shibukawa <yoshiki@shibu.jp>
Added note about potential failure in virtualized environments when attaching the eBPF program to network interfaces. Explained the use of generic mode as an alternative. Signed-off-by: Yoshiki Shibukawa <yoshiki@shibu.jp>
Signed-off-by: Yoshiki Shibukawa <yoshiki@shibu.jp>
| To follow along with the example, you'll need: | ||
|
|
||
| * Linux kernel version 5.7 or later, for bpf_link support | ||
| * LLVM 11 or later [^1] (`clang` and `llvm-strip`) |
There was a problem hiding this comment.
llvm-strip is the actual utility we use in our makefile hence why it is listed here. Its not a mistake.
Line 5 in 2e4cf1c
There was a problem hiding this comment.
OK. I my intention was apt package name, not program name. I will fix it.
| Note: On virtualized environments or network interfaces whose drivers do not | ||
| support native XDP, attaching may fail with "operation not supported". | ||
| In such cases, you can use generic mode instead: | ||
|
|
||
| Flags: link.XDPGenericMode | ||
|
|
||
| Generic mode has lower performance but works on a wider range of interfaces. |
There was a problem hiding this comment.
I am not entirely sure if we want to encourage the usage of generic mode. XDP driver support for Virtio support exists since v4.10, and veth support since v4.19. A lot of more specialized virtual NICs have gained support in later kernels https://docs.ebpf.io/linux/program-type/BPF_PROG_TYPE_XDP/#driver-support.
So for the purposes of testing a user can always use a veth pair (via a container).
Generic mode has poor test coverage. So in production, when native XDP is not available, users should fallback to tc / BPF_PROG_TYPE_SCHED_CLS programs instead, which have broader capabilities, are better tested, and have comparable performance.
Long story short. I don't think this is advice we want to give people, especially not those that don't know any better.
Updated LLVM requirement to include 'llvm-strip' and clarified package distribution details. Signed-off-by: Yoshiki Shibukawa <yoshiki@shibu.jp>
Thank you for your grate product and effort.
apt Package:
https://packages.debian.org/search?keywords=llvm-strip&searchon=names&suite=all§ion=all
https://packages.ubuntu.com/search?keywords=llvm-strip&searchon=names&suite=all§ion=all
Both Debian and Ubuntu current versions don't have llvm-strip package and llvm seems to ship llvm-strip command.
link option:
I tried to run on UTM (macOS's virtual machine) with Ubuntu 25.10, I need to add flag to run.