Home

Awesome

generic-ebpf

Generic eBPF runtime. It (currently) consists of three components

  1. ebpf: Portable interpreter, JIT compiler, and ebpf subsystems (e.g. map) library, works in both of userspace and kernel.
  2. ebpf_dev: Character device for loading ebpf program or other related objects (e.g. map) into kernel. Alternative of Linux bpf(2).
  3. libgbpf: A library which implements abstruction 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

ebpfebpf_dev
FreeBSD KernelYesYes
FreeBSD UserYes-
Linux KernelYesYes
Linux UserYes-
MacOSX UserYes-

Build

$ make

After compilation, you will see at least one of below

Please load or link them.

Running tests

Tests for user space library

// Install Python packages
$ pip install -r requirements.txt

// After make
$ make check

Tests for kernel

// After make
# make load
# make check-kern

Example Applications

VALE-BPF

Enhansing eBPF programmability to VALE (a.k.a. mSwitch) a very fast and modular software switch.

Notes

Our ebpf interpreter and jit codes (and its tests) are based on ubpf

Dependencies

Concurrency Kit and Google Test are contained to this repository. You don't have to install them by yourself.