docs: fix XDP stub compile command

This commit is contained in:
LinuxDev9002
2026-07-14 03:59:52 -07:00
parent 3a722c03d5
commit 9c6d32c657
2 changed files with 5 additions and 3 deletions

View File

@@ -450,7 +450,7 @@ To run the XDP load balancer, execute the following command, specifying the inte
To make XDP work with veth interfaces we need to add a stub eBPF program to the other end of the pair.
```console
clang -target bpf -o stub.bpf.o -c stub.bpf.c
clang -target bpf -I/usr/include/$(uname -m)-linux-gnu -o stub.bpf.o -c stub.bpf.c
sudo ip l set dev veth7 xdp obj ./stub.bpf.o sec .xdp # stub XDP_PASS on the receiving interface
sudo ip netns exec lb ./xdp_lb veth6 10.0.0.2 de:ad:be:ef:00:02 10.0.0.3 de:ad:be:ef:00:03
```