From 58aad7b7184c285d1ffa5bcbdfc1b20a1fdf408c Mon Sep 17 00:00:00 2001 From: Yoshiki Shibukawa Date: Sun, 15 Feb 2026 07:09:47 +0900 Subject: [PATCH 1/4] Update getting-started.md 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 --- docs/ebpf/guides/getting-started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ebpf/guides/getting-started.md b/docs/ebpf/guides/getting-started.md index 0f6a01b96..789aaf674 100644 --- a/docs/ebpf/guides/getting-started.md +++ b/docs/ebpf/guides/getting-started.md @@ -19,7 +19,7 @@ more. 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`) + * LLVM 11 or later [^1] (`clang` and `llvm`) * libbpf headers [^2] * Linux kernel headers [^3] * Go compiler version supported by {{ proj }}'s Go module @@ -28,7 +28,7 @@ more. Use `clang --version` to check which version of LLVM you have installed. Refer to your distribution's package index to finding the right packages to install, as this tends to vary wildly across distributions. Some - distributions ship `clang` and `llvm-strip` in separate packages. + distributions ship `clang` and `llvm` in separate packages. [^2]: For Debian/Ubuntu, you'll typically need `libbpf-dev`. On Fedora, it's From 002a874a7c1d2400fdc14e617068688a62ff688f Mon Sep 17 00:00:00 2001 From: Yoshiki Shibukawa Date: Sun, 15 Feb 2026 07:47:35 +0900 Subject: [PATCH 2/4] Add note on attaching eBPF program in virtualized environments 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 --- docs/ebpf/guides/getting-started.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/ebpf/guides/getting-started.md b/docs/ebpf/guides/getting-started.md index 789aaf674..205dfec73 100644 --- a/docs/ebpf/guides/getting-started.md +++ b/docs/ebpf/guides/getting-started.md @@ -214,6 +214,14 @@ standard library here. `CountPackets`) eBPF program with `eth0`. This returns a {{ godoc('link/Link') }} abstraction. + 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. + 1. Close the file descriptor of the Program-to-interface association. Note that this will stop the Program from executing on incoming packets if the Link was not {{ godoc('link/Link.Pin') }}ed to the bpf file system. From 8c0306cadb1295613981d13484a4e5332a9c44b6 Mon Sep 17 00:00:00 2001 From: Yoshiki Shibukawa Date: Sun, 15 Feb 2026 08:03:03 +0900 Subject: [PATCH 3/4] Fix indent Signed-off-by: Yoshiki Shibukawa --- docs/ebpf/guides/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ebpf/guides/getting-started.md b/docs/ebpf/guides/getting-started.md index 205dfec73..ea1c75dbe 100644 --- a/docs/ebpf/guides/getting-started.md +++ b/docs/ebpf/guides/getting-started.md @@ -220,7 +220,7 @@ standard library here. Flags: link.XDPGenericMode -Generic mode has lower performance but works on a wider range of interfaces. + Generic mode has lower performance but works on a wider range of interfaces. 1. Close the file descriptor of the Program-to-interface association. Note that this will stop the Program from executing on incoming packets if the Link was From 258c7cbeb24f012c5ad4f3f6683ed438ef32e9cf Mon Sep 17 00:00:00 2001 From: Yoshiki Shibukawa Date: Thu, 19 Feb 2026 21:56:35 +0900 Subject: [PATCH 4/4] Fix for comment Updated LLVM requirement to include 'llvm-strip' and clarified package distribution details. Signed-off-by: Yoshiki Shibukawa --- docs/ebpf/guides/getting-started.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/ebpf/guides/getting-started.md b/docs/ebpf/guides/getting-started.md index ea1c75dbe..87bcd1cb8 100644 --- a/docs/ebpf/guides/getting-started.md +++ b/docs/ebpf/guides/getting-started.md @@ -19,7 +19,7 @@ more. 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`) + * LLVM 11 or later [^1] (`clang` and `llvm-strip`) * libbpf headers [^2] * Linux kernel headers [^3] * Go compiler version supported by {{ proj }}'s Go module @@ -28,7 +28,8 @@ more. Use `clang --version` to check which version of LLVM you have installed. Refer to your distribution's package index to finding the right packages to install, as this tends to vary wildly across distributions. Some - distributions ship `clang` and `llvm` in separate packages. + distributions ship `clang` and `llvm-strip` in separate packages + (and `llvm-strip` would be included in `llvm` pacakge). [^2]: For Debian/Ubuntu, you'll typically need `libbpf-dev`. On Fedora, it's