diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-12-17 18:30:16 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-12-17 17:37:07 +0000 |
commit | bd3ff678b733964c689b52ff1b0d2c838edeb8b8 (patch) | |
tree | 901f7a5ecd69cc692d3112d9c53aaa80c239f2c6 /src/ebpf/Makefile | |
parent | a6b35825a78b5fe8c3a91bc4cf6abf0f50a08738 (diff) | |
download | vyos-1x-bd3ff678b733964c689b52ff1b0d2c838edeb8b8.tar.gz vyos-1x-bd3ff678b733964c689b52ff1b0d2c838edeb8b8.zip |
xdp: T2666: initial XDP (generic mode) forwarding support
The CLI command 'set interfaces ethernet <interface> offload-options xdp" enables
the XDP generic mode on the given interface.
vyos@vyos:~$ show interfaces ethernet eth1
eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 xdpgeneric/id:151 qdisc mq state DOWN group default qlen 1000
link/ether 00:50:56:bf:ef:aa brd ff:ff:ff:ff:ff:ff
inet6 fe80::250:56ff:febf:efaa/64 scope link tentative
valid_lft forever preferred_lft forever
Description: fooa
XDP code is thankfully copied from [1], thank you for this nice tutorial.
NOTE: this is an experimental feature which might break your
forwarding/filtering.
[1]: https://medium.com/swlh/building-a-xdp-express-data-path-based-peering-router-20db4995da66
Diffstat (limited to 'src/ebpf/Makefile')
-rw-r--r-- | src/ebpf/Makefile | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ebpf/Makefile b/src/ebpf/Makefile new file mode 100644 index 000000000..5b80c32d7 --- /dev/null +++ b/src/ebpf/Makefile @@ -0,0 +1,16 @@ +#clang -target bpf -O2 -c xdp-drop-ebpf.c -o xdp-drop-ebpf.o + +src = $(wildcard *.c) +obj = $(src:.c=.o) +CLANG = clang +CFLAGS = -Wall -Wno-unused-value -Wno-pointer-sign -Wno-compare-distinct-pointer-types -Werror -O2 + +%.o: %.c + $(CLANG) -target bpf $(CFLAGS) -o $@ -c $< + +.PHONY: all +all: $(obj) + +.PHONY: clean +clean: + rm -f *.o |