Fix README
This commit is contained in:
parent
70aee3087b
commit
9e3488dcba
1 changed files with 12 additions and 2 deletions
|
@ -1,13 +1,19 @@
|
||||||
Compile:
|
Compile:
|
||||||
|
|
||||||
```
|
```
|
||||||
clang -O2 -Wall -target bpf -c main.c -o main.o
|
clang -O2 -Wall -target bpf -c xdp_udp.c -o xdp_udp.o
|
||||||
```
|
```
|
||||||
|
|
||||||
Load:
|
Load:
|
||||||
|
|
||||||
```
|
```
|
||||||
ip link set dev lo xdp obj main.o
|
ip link set dev lo xdp obj xdp_udp.o sec xdp_udp
|
||||||
|
```
|
||||||
|
|
||||||
|
View:
|
||||||
|
|
||||||
|
```
|
||||||
|
ip link show dev lo
|
||||||
```
|
```
|
||||||
|
|
||||||
Unload:
|
Unload:
|
||||||
|
@ -15,3 +21,7 @@ Unload:
|
||||||
```
|
```
|
||||||
ip link set dev lo xdp off
|
ip link set dev lo xdp off
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Sources:
|
||||||
|
- https://github.com/xdp-project/xdp-tutorial
|
||||||
|
- https://github.com/xdp-project/xdp-tutorial/tree/master/basic01-xdp-pass
|
||||||
|
|
Loading…
Reference in a new issue