This project contains C source code to execute multiple functions via eBPF tail calls when a packet arrives.
This project is built with Meson (the build system).
It requires an eBPF-supported Linux kernel (modern Linux kernels almost support them! :D), bpftool, clang, llvm (I used LLVM 18), libbpf, and libelf.
- Create the build directory with
meson setup builddir --native-file=clang.ini - Inside the build directory(
/builddir), build the project withmeson compile. - After that, execute the program via
sudo ./xdp_tailcall <NIC interface name>.
Print the trace pipe(/sys/kernel/debug/tracing/trace_pipe) and you'll be able to observe program outputs.
Those tail-called functions are generated upon every packet arrival at the designated NIC (Network Interface Card).