# l3-forwarding-xdp 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 ```