eBPF DocumentaryWatch Now

Infrastructure

  • Linux Kernel

    eBPF Runtime

    The Linux kernel contains the eBPF runtime required to run eBPF programs. It implements the bpf(2) system call for interacting with programs, maps, BTF and various attachment points where eBPF programs can be executed from. The kernel contains a eBPF verifier in order to check programs for safety and a JIT compiler to translate programs to native machine code. User space tooling such as bpftool and libbpf are also maintained as part of the upstream kernel.

  • LLVM Compiler

    eBPF Backend

    The LLVM compiler infrastructure contains the eBPF backend required to translate programs written in a C-like syntax to eBPF instructions. LLVM generates eBPF ELF files which contain program code, map descriptions, relocation information and BTF meta data. These ELF files contain all necessary information for eBPF loaders such as libbpf to prepare and load programs into the Linux kernel. The LLVM project also contains additional developer tools such as an eBPF object file disassembler.

  • GCC Compiler

    eBPF Backend

    The GCC compiler comes with an eBPF backend starting from GCC 10. Up to that point, LLVM has been the only compiler which supports generating eBPF ELF files. The GCC port is roughly equivalent to the LLVM eBPF support. There are some missing bits of functionality but the GCC community is working to close these gaps over time. GCC also contains eBPF binutils as well as eBPF gdb support for debugging of eBPF code that is traditionally consumed by the Linux kernel. Included as part of this is an eBPF simulator for gdb.

  • bpftool

    Command-line tool to inspect and manage eBPF objects

    Powered by libbpf, bpftool is the reference utility to quickly inspect and manage BPF objects on a Linux system. Use it to list, dump, or load eBPF programs and maps, to generate skeletons for eBPF applications, to statically link eBPF programs from different object files, or to perform various other eBPF-related tasks.

  • C++

    • libbpf

      libbpf is a C/C++ based library which is maintained as part of the upstream Linux kernel. It contains an eBPF loader which takes over processing LLVM generated eBPF ELF files for loading into the kernel. libbpf received a major boost in capabilities and sophistication and closed many existing gaps with BCC as a library. It also supports important features not available in BCC such as global variables and BPF skeletons.

  • Golang

    • eBPF

      eBPF is designed as a pure Go library that provides utilities for loading, compiling, and debugging eBPF programs. It has minimal external dependencies and is intended to be used in long running processes.

    • libbpfgo

      libbpfgo is a Go wrapper around libbpf. It supports BPF CO-RE and its goal is to be a complete implementation of libbpf APIs. It uses CGo to call into linked versions of libbpf.

  • Rust

    • aya

      aya is an eBPF library built with a focus on operability and developer experience. It allows for both eBPF programs and their userspace programs to be written in Rust.

    • libbpf-rs is a safe, idiomatic, and opinionated wrapper API around libbpf written in Rust. libbpf-rs, together with libbpf-cargo (libbpf cargo plugin) allows to write 'compile once run everywhere' (CO-RE) eBPF programs.

  • Utilities for use with XDP

    libxdp is an XDP-specific library that sits on top of libbpf and implements a couple of XDP features: it supports loading of multiple programs to run in sequence on the same interface, and it contains helper functions for configuring AF_XDP sockets as well as reading and writing packets from these sockets.

  • PcapPlusPlus

    C++ library for capturing, parsing and crafting network packets

    PcapPlusPlus is a multi-platform C++ library for capturing, parsing and crafting network packets. It is designed to be efficient, powerful and easy to use. PcapPlusPlus enables capturing and sending network packets through a variaty of packet processing engines, one of them is eBPF AF_XDP sockets. It features an easy-to-use C++ interface for creating AF_XDP sockets, making it easy to send and receive packets through them.

  • Are these projects under the eBPF Foundation?

    • This page lists a number of open source projects that use eBPF as the underlying core technology. These projects are not all under the eBPF Foundation but are listed here as a survey of the eBPF project landscape today.
  • Add your project

    1. Make sure that the project is meeting the requirements to be listed. See below.
    2. Open a pull request and provide the required information. Use one of the already listed projects as a template. The ordering of applications is based on the number of Github stars (high to low), updated on a quarterly basis.
    3. The pull request will be reviewed by the community and merged by one of the maintainers. If you have any questions, feel free to ask on Slack.
  • Are you maintaining a listed project?

    • If you are maintaining one of the listed projects and would like to adjust the content. Get in touch on Slack or open a pull request directly.
  • Requirements for a project to be listed

    Projects can be listed on this page as "Major" or "Emerging". The requirements for being listed as "Emerging" are:

    • The project must be open source. All source code must be licensed under an open source license. Any documentation must be licensed under an open license.
    • The project must be using eBPF as its underlying core technology (in other words, a project would lose its purpose if the eBPF parts are removed) or help accelerate the adoption of eBPF in production.
    • The project must be actively maintained.
    • The project must be open to collaboration and have a governance model following open source best-practices.

    In order to be listed as a "Major" project, a project must meet all of the requirements above, plus:

    • The project must have more than 50 contributors.
    • The project must be used in production-like environments with a significant amount of users. Since this information may not be easily discoverable from a link to the project, such information should be included in the pull request description.