README.md aktualisiert

This commit is contained in:
Tizian Maxime Weigt 2025-10-27 16:16:08 +00:00
parent cf0b0c1655
commit cc3765743f

View File

@ -2,7 +2,36 @@
L3-L4 xdp based forwarding
xdp-tools is your friend to load xdp in that case.
# INSTALL
```
apt update
```
```
apt install clang llvm libbpf-dev libelf-dev pkg-config make git bpftool xdp-tools
```
# Compile
```
clang -O2 -g -Wall -target bpf \
-D__BPF_TRACING__ \
-I/usr/include \
-I/usr/include/linux \
-c main.c -o main.o
```
# Attach to the interface
```
xdp-loader load eth0 ./main.o
```
```
xdp-loader status
```
``` BASH
bpftool map show
bpftool map dump name xdp_flow_stats
bpftool map dump name xdp_flow_stats
```