README.md aktualisiert
This commit is contained in:
parent
cf0b0c1655
commit
cc3765743f
29
README.md
29
README.md
@ -2,7 +2,36 @@
|
|||||||
|
|
||||||
L3-L4 xdp based forwarding
|
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
|
``` BASH
|
||||||
bpftool map show
|
bpftool map show
|
||||||
|
bpftool map dump name xdp_flow_stats
|
||||||
|
|
||||||
bpftool map dump name xdp_flow_stats
|
bpftool map dump name xdp_flow_stats
|
||||||
```
|
```
|
||||||
Loading…
x
Reference in New Issue
Block a user