Generic eBPF runtime. It (currently) consists of three components
- ebpf: Portable interpreter, JIT compiler, and ebpf subsystems (e.g. map) library, works in both of userspace and kernel.
- ebpf_dev: Character device for loading ebpf program or other related objects (e.g. map) into kernel. Alternative of Linux bpf(2).
- libgbpf: A library which implements abstraction layer for interacting with various eBPF systems and eBPF ELF parser. Currently supports ebpf_dev and Linux's native eBPF (experimental) as backends.
Current support status
ebpf | ebpf_dev | |
---|---|---|
FreeBSD Kernel | Yes | Yes |
FreeBSD User | Yes | - |
Linux Kernel | Yes | Yes |
Linux User | Yes | - |
MacOSX User | Yes | - |
$ make
After compilation, you will see at least one of below
- ebpf.ko: Kernel module for ebpf library
- ebpf-dev.ko: Kernel module for ebpf character device
- libebpf.so: User space library for ebpf
- libgbpf.a: Library for interacting with various eBPF systems
Please load or link them.
// Install Python packages
$ pip install -r requirements.txt
// After make
$ make check
// After make
# make load
# make check-kern
Enhansing eBPF programmability to VALE (a.k.a. mSwitch) a very fast and modular software switch.
- libelf (for libgbpf)
- Concurrency Kit (for userspace targets)
- Google Test (for testing)
Concurrency Kit and Google Test are contained to this repository. You don't have to install them by yourself.