Top 50 Awesome List

zoidbergwill/awesome-ebpf

Platforms  6 days ago  1.7k
A curated list of awesome projects related to eBPF.
View byDAY/WEEK/README
View on Github

Oct 19th

Projects Related to eBPF

  • pixiestars2.1k - Observability for Kubernetes using eBPF. Features include protocol tracing, application profiling, and support for distributed bpftrace deployments.
  • Oct 11th

    Examples

  • redbpf examples - Example programs for using RedBPF to write eBPF programs in Rust.
  • Projects Related to eBPF

  • redbpfstars885 - Tooling and framework to write eBPF code in Rust efficiently.
  • Sep 14th

    Projects Related to eBPF

  • greggdstars4 - System daemon to compile and load eBPF programs into the kernel, and forward program output to socket for metric aggregation.
  • Tutorials

  • All your tracing are belong to BPF - A step-by-step walkthrough to integrate tracing capabilities in your C++ applications with the LLVM libraries.
  • Aug 2nd

    Projects Related to eBPF

  • upf-bpfstars69 - An in-kernel solution based on XDP for 5G UPF.
  • Apr 22nd

    Tutorials

  • How I ended up writing opensnoop in pure C using eBPF - A thorough walk-through of how to write eBPF programs, first using only bpf() syscall, and then libbpf library, with reproducible code examples.
  • Apr 20th

    Tutorials

  • Building BPF applications with libbpf-bootstrap - Helps generate minimal or advanced templates to bootstrap your own applications (kernel side and user space management for maps and programs) with features like CO-RE, global variables, and ring buffer.
  • eBPF Workflow: Tools and Utilities

    libbpf

  • libbpf-bootstrapstars168 - Scaffolding for BPF application development with libbpf and BPF CO-RE.
  • Mar 1st

    Articles and Presentations

    Generic eBPF presentations

  • eBPF - From a Programmer's Perspective - A short paper describing the fundamentals of eBPF and how to get started with writing eBPF programs.
  • Feb 1st

    Examples

  • ebpf-kill-examplestars4 - A fully documented and tested example of an eBPF probe that logs all force-kills and prints them out in user-space.
  • Oct 16th, 2020

    Articles and Presentations

    cBPF

  • The FreeBSD manual page about BPF
  • Sep 16th, 2020

    Reference Documentation

    eBPF Essentials

  • ebpf.io - A gateway to discover all the basics of eBPF, including a listing of the main related projects and of community resources.
  • Cilium's BPF and XDP Reference Guide - In-depth documentation about most features and aspects of eBPF.
  • Jun 10th, 2020

    Reference Documentation

    Kernel Documentation

  • linux/Documentation/networking/filter.rst - eBPF specification (somewhat outdated; information should still be valid, but not exhaustive).
  • Feb 10th, 2020

    Articles and Presentations

    Generic eBPF presentations

  • BPF -- in-kernel virtual machine - Presentation by the author of eBPF.
  • Jan 23rd, 2020

    eBPF Workflow: Tools and Utilities

    User Space eBPF

  • osterstars211 - Written in Go. A tool for tracing execution of Go programs by attaching eBPF to uprobes.
  • Jan 9th, 2020

    Articles and Presentations

    XDP

  • How to drop 10 million packets per second - Cloudflare's blog post talking about their move to using XDP for packet filtering.
  • Jul 4th, 2019

    Articles and Presentations

    Generic eBPF presentations

  • Linux Kernel Observability through eBPF - A blog post covering the basics of eBPF as well as code samples in Go on how to build and load a minimal eBPF program into the kernel.
  • Jun 4th, 2019

    Reference Documentation

    Kernel Documentation

  • BPF Documentation - Index for BPF-related documentation coming with the Linux kernel.
  • BPF Design Q&A - Frequently Asked Questions on the decisions behind the BPF infrastructure.
  • HOWTO interact with BPF subsystem - Frequently Asked Questions about contributing to eBPF development.
  • Reference Documentation

    Manual Pages

  • bpf(2) - Manual page about the bpf() system call, used to manage BPF programs and maps from userspace.
  • tc-bpf(8) - Manual page about using BPF with tc, including example commands and samples of code.
  • bpf-helpers(7) man page - Description of the in-kernel helper functions forming the BPF standard library.
  • Reference Documentation

    Other

  • IO Visor's Unofficial eBPF spec - Summary of eBPF syntax and operation codes.
  • Jesper Dangaard Brouer's documentation - Work in progress, contributions welcome.
  • Emails from David Miller to the xdp-newbies mailing list:

  • List of BPF features per kernel version
  • Articles and Presentations

    Generic eBPF presentations

  • A brief introduction to XDP and eBPF - An accessible introduction providing context, history, and details about the functioning of eBPF.
  • An eBPF Overview - Blog series by Adrian Ratiu, covering many aspects of the eBPF infrastructure:

  • Ferris Ellis's blog posts about eBPF - They have a few posts about eBPF:
  • A BPF reference guide - About BPF C and bcc Python helpers, from bcc repository.
  • Making the Kernel's Networking Data Path Programmable with BPF and XDP - A set of slides covering all the basics about eBPF and XDP (mostly for network processing).
  • The BSD Packet Filter - An introduction mostly covering the tracing aspects.
  • BPF: tracing and more - An introduction mostly covering the tracing aspects.
  • Linux BPF Superpowers - An introduction mostly covering the tracing aspects, first part with flame graphs.
  • IO Visor - Also introduces IO Visor project.
  • Extending extended BPF - A blog post from 2014 on the development of BPF and demonstrating what can be done with it, using an example of stateful socket filtering by attaching an eBPF program to a socket.
  • Greg Marsden made some documentation about eBPF:
  • Articles and Presentations

    BPF Internals

  • Daniel Borkmann has made several presentations and papers covering the internals of eBPF, in particular about its use with tc.

  • IO Visor blog
  • Linux Networking Explained - Linux networking internals, with a part about eBPF.
  • Articles and Presentations

    Kernel Tracing

  • Full-system dynamic tracing on Linux using eBPF and bpftrace - A detailed introduction to tracing with eBPF, from listing the available trace points to running bpftrace programs.
  • Meet-cute between eBPF and Kernel Tracing - Kprobes, uprobes, ftrace.
  • Linux Kernel Tracing - Systemtap, Kernelshark, trace-cmd, LTTng, perf-tool, ftrace, hist-trigger, perf, function tracer, tracepoint, kprobe/uprobe, and more.
  • Brendan Gregg's blog, and in particular Linux BPF Superpowers article.
  • Articles and Presentations

    XDP

  • The eXpress Data Path - A very accessible introduction to XDP, providing sample code to show how to process packets.
  • All XDP details in a technical paper: The eXpress Data Path: Fast Programmable Packet Processing in the Operating System Kernelstars103, by Toke Høiland-Jørgensen, Jesper Dangaard Brouer, Daniel Borkmann, John Fastabend, Tom Herbert, David Ahern and David Miller, all being essential eBPF and XDP contributors.
  • Work-in-progress documentation for XDP
  • BPF and XDP Reference Guide - Guide from the Cilium project.
  • XDP Project overview
  • eXpress Data Path (XDP) - The first presentation about XDP.
  • BoF - What Can BPF Do For You?
  • eXpress Data Path - Contains some benchmark results obtained with the mlx4 driver.
  • Jesper Dangaard Brouer has several sets of slides describing the internals of XDP:

  • XDP workshop -- Introduction, experience, and future development (Video)
  • High Speed Packet Filtering on Linux - About packet filtering on Linux, DDoS protection, packet processing in the kernel, kernel bypass, XDP and eBPF.
  • Articles and Presentations

    AF_XDP

  • AF_XDP - Kernel documentation on the AF_XDP address family.
  • Fast Packet Processing in Linux with AF_XDP
  • Articles and Presentations

    bpfilter

  • Why is the kernel community replacing iptables with BPF? - A blog post by Cilium on the the motivations behind eBPF and bpfilter, with a couple examples and links to other projects using eBPF and bpfilter.
  • bpfilter: Linux firewall with eBPF sauce - Slides from a talk by Quentin Monnet with a background on eBPF and comparing bpfilter to iptables.
  • Articles and Presentations

    BTF

  • BPF Type Format (BTF) - Kernel documentation about BTF, explaining how to use it.
  • Enhancing the Linux kernel with BTF type information - A description of the work done with BTF to provide debugging information for BPF programs.
  • Articles and Presentations

    cBPF

  • The BSD Packet Filter: A New Architecture for User-level Packet Capture - The original paper about (classic) BPF.
  • Linux' packet mmap(2), BPF, and Netsniff-NG
  • tc and cls bpf: lightweight packet classifying with BPF
  • Introducing Cloudflare's BPF Tools - Usage of BPF bytecode with the xt_bpf module for iptables.
  • Libpcap filters syntax
  • Articles and Presentations

    Hardware Offload

  • eBPF/XDP hardware offload to SmartNICs - Hardware offload for eBPF with TC or XDP (Linux kernel 4.9+), introduced by Netronome.
  • Comprehensive XDP offload---Handling the edge cases - An update on the topic above.
  • Tutorials

  • bcc Reference Guide - Many incremental steps to start using bcc and eBPF, mostly centered on tracing and monitoring.
  • bcc Python Developer Tutorial - Comes with bcc, but targets the Python bits across seventeen "lessons".
  • Linux Tracing Workshops Materialsstars980 - Involves the use of several BPF tools for tracing.
  • Tracing a packet journey using Linux tracepoints, perf and eBPF - Troubleshooting ping requests and replies with perf and bcc programs.
  • Open NFP platform - Operated by Netronome: some tutorials for network-related eBPF use cases, including an eBPF Offload Starting Guide.
  • XDP for the Rest of Us - First edition of a workshop to get started with XDP.
  • XDP for the Rest of Us - Second edition, with new contents.
  • Load XDP programs using the ip (iproute2) command
  • XDP Hands-On Tutorialstars996 - A progressive (three levels of difficulty) tutorial to learn how to process packets with XDP.
  • Examples

  • linux/samples/bpf/ - In the kernel tree: some sample eBPF programs.
  • linux/tools/testing/selftests/bpf - In the kernel tree: Linux BPF selftests, with many eBPF programs.
  • prototype-kernel/kernel/samples/bpf - Jesper Dangaard Brouer's prototype-kernel repository contains some additional examples that can be compiled outside of kernel infrastructure.
  • iproute2/examples/bpf/ - Some networking programs to attach to the TC interface.
  • Netronome sample network applicationsstars44 - Provides basic but complete examples of eBPF applications also compatible with hardware offload.
  • bcc/examples - Examples coming along with the bcc tools, mostly about tracing.
  • bcc/tools - These tools themselves can be seen as example use cases for BPF programs, mostly for tracing and monitoring. bcc tools have been packaged for some Linux distributions.
  • MPLSinIP samplestars29 - A heavily commented sample demonstrating how to encapsulate & decapsulate MPLS within IP. The code is commented for those new to BPF development.
  • ebpf-samplesstars13 - A collection of compiled (as ELF object files) samples gathered from several projects, primarily intended to serve as test cases for user space verifiers.
  • eBPF Workflow: Tools and Utilities

    bcc

  • bccstars12.8k - Framework and set of tools - One way to handle BPF programs, in particular for tracing and monitoring. Also includes some utilities that may help inspect maps or programs on the system.
  • P4 compiler for BPF targets for bcc - An alternative to the restricted C.
  • Lua front-end for BCC - Another alternative to C, and even to most of the Python code used in bcc.
  • eBPF Workflow: Tools and Utilities

    iproute2

  • iproute2 - Package containing tools for network management on Linux. In particular, it contains tc, used to manage eBPF filters and actions, and ip, used to manage XDP programs. Most of the code related to BPF is in lib/bpf.c.
  • iproute2-next - The development tree, synchronised with net-next.
  • eBPF Workflow: Tools and Utilities

    LLVM

  • LLVM - Contains several tools used in eBPF workflows. Snapshots of the latest versions for Ubuntu/Debian can be retrieved from here.

    • clang is used to compile C to eBPF object file under the ELF format (clang v3.7.1+). The BPF backend was added with this commit.
    • llvm-objdump is used to dump the content of an object file in human-readable format, possibly with the initial C source code (llvm-objdump v4.0+).
    • llvm-mc is used to compile from LLVM intermediate representation to eBPF object file, so that one can compile from C to eBPF assembly, tinker with assembly, then compile to ELF file.
  • eBPF Workflow: Tools and Utilities

    libbpf

  • libbpf - A C library used for handling BPF objects (programs and maps), and manipulating ELF object files containing them. It is shipped with the kernel and mirrored on GitHubstars592.
  • eBPF Workflow: Tools and Utilities

    bpftool and Other Tools from the Kernel Tree

  • bpftool - Also some other tools in the kernel tree, under linux/tools/net/ for versions earlier than 4.15, or linux/tools/bpf/ after that:

    • bpftool - A generic utility that can be used to interact with eBPF programs and maps from userspace, for example to show, dump, load, disassemble, pin programs, or to show, create, pin, update, delete maps, or to attach and detach programs to cgroups.
    • bpf_asm - A minimal cBPF assembler.
    • bpf_dbg - A small debugger for cBPF programs.
    • bpf_jit_disasm - A disassembler for both BPF flavors and could be highly useful for JIT debugging.
  • eBPF Workflow: Tools and Utilities

    User Space eBPF

  • uBPFstars389 - Written in C. Contains an interpreter, a JIT compiler for x86_64 architecture, an assembler and a disassembler.
  • A generic implementationstars113 - With support for FreeBSD kernel, FreeBSD user space, Linux kernel, Linux user space and macOS user space. Used for the VALE software switch's BPF extension modulestars26.
  • rbpfstars377 - Written in Rust. Interpreter for Linux, macOS and Windows, and JIT-compiler for x86_64 under Linux.
  • PREVAILstars136 - A user space verifier for eBPF using an abstract interpretation layer, with support for loops.
  • eBPF Workflow: Tools and Utilities

    Testing in Virtual Environments

  • A Vagrant setupstars72 - To easily test XDP. Less useful now that generic XDP (driver-independant, mostly for testing) exists.
  • bcc in a Docker containerstars30
  • Projects Related to eBPF

  • P4 has some interactions with eBPF:

  • Cilium project (GitHub repositorystars9.4k) is a technology relying on BPF and XDP to provide "fast in-kernel networking and security policy enforcement for containers based on eBPF programs generated on the fly". Many presentations available (with overlap):

  • Open vSwitch (OvS), and its related project Open Virtual Network (OVN, an open source network virtualization solution) are considering using eBPF at various level:

  • Katran - A layer 4 load-balancer based on XDP, open-sourced by Facebook.
  • XDP in practice: integrating XDP in our DDoS mitigation pipeline - Protection against DDoS with XDP at Cloudflare.
  • Droplet: DDoS countermeasures powered by BPF + XDP - Protection against DDoS with XDP at Facebook.
  • DPDK has a poll-mode driver (PMD) based on AF_XDP
  • CETH for XDP - Common Ethernet Driver Framework for faster network I/O, a technology initiated by Mellanox.
  • Suricata, an open source intrusion detection system, relies on eBPF components for its "capture bypass" features:

  • Sysdigstars6.7k - A tool for "universal system visibility with native support for containers", now supports eBPF.
  • InKeV: In-Kernel Distributed Network Virtualization for DCN
  • gobpf - utilizing eBPF from Go - A library to create, load and use eBPF programs from Go.
  • ply - A small but flexible open source dynamic tracer for Linux, with features similar to the bcc tools, but with a simpler language inspired by awk and DTrace.
  • bpftracestars4.3k - A tool for tracing, again with its own DSL. It is flexible enough to be envisioned as a Linux replacement for DTrace and SystemTap.
  • kubectl tracestars1.4k - A kubectl plug-in for executing bpftrace programs in a Kubernetes cluster.
  • bpfdstars422 - Framework for running BPF programs with rules on Linux as a daemon. Container aware.
  • BPFdstars77 - A distinct BPF daemon, trying to leverage the flexibility of the bcc tools to trace and debug remote targets, and in particular devices running with Android.
  • adebstars147 - A Linux shell environment for using tracing tools on Android with BPFd.
  • FUSE - Considers using eBPF.
  • DEEP-mon - Helps with measuring power consumption for servers and uses eBPF programs for in-kernel aggregation of data.
  • The Code

  • linux/include/linux/bpf.h - with linux/include/uapi/bpf.h: definitions related to eBPF, to be used respectively in the kernel and to interface with userspace programs.
  • linux/include/linux/filter.h - with linux/include/uapi/filter.h: information used to run the BPF programs themselves.
  • linux/kernel/bpf/ - This directory contains most of BPF-related code. In particular, those files are worth of interest:

    • syscall.c - Different operations permitted by the system call, such as program loading or map management.
    • core.c - BPF interpreter.
    • verifier.c - BPF verifier.
  • linux/net/core/filter.c - Functions and eBPF helpers related to networking (TC, XDP etc.); also contains the code to migrate cBPF bytecode to eBPF (all cBPF programs are translated to eBPF in recent kernels).
  • linux/kernel/trace/bpf_trace.c - Functions and eBPF helpers related to tracing and monitoring (kprobes, tracepoints, etc.).
  • The JIT compilers are under the directory of their respective architectures, such as file linux/arch/x86/net/bpf_jit_comp.c for x86. Exception is made for JIT compilers used for hardware offload, sitting in their drivers, such as linux/drivers/net/ethernet/netronome/nfp/bpf/jit.c for Netronome NFP.
  • linux/net/sched/ - and in particular in files act_bpf.c (action) and cls_bpf.c (filter): code related to BPF actions and filters with TC.
  • linux/kernel/seccomp.c
  • linux/net/core/dev.c - contains the function dev_change_xdp_fd() that is called through a Netlink command to hook a XDP program to a device, after is has been loaded into the kernel from user space. This function in turns uses a callback from the relevant driver.
  • Development and Community

  • The bpf-next tree - BPF patches land in this tree. It is regularly merged into net-next, which is itself merged for each release to Linus' tree.
  • Kernel documentation - About contributions to BPF.
  • The netdev mailing list - Mailing list for Linux kernel networking stack development. All patches are sent there for review and inclusion.
  • XDP-newbies - A mailing list specially dedicated to XDP programming (both for architecture or for asking for help).
  • IO Visor mailing list - BPF is at the heart of the project, and is regularly discussed on the mailing list.
  • @IOVisor Twitter account
  • The XDP Collaboration Projectstars159 - A GitHub repository with notes and ideas regarding the future evolutions of XDP.
  • Other Lists of Resources on eBPF

  • IO Visor's bcc documentation
  • IO Visor's bpf-docs repositorystars629
  • Dive into BPF: A List of Reading Material
  • Last Checked At: 2021-10-25T15:14:48.679Z
    Previous
    Friz-zy/awesome-linux-containers
    Next
    PandaFoss/Awesome-Arch

    About

    Track your favorite github awesome repo, not just star it. trackawesomelist.com provides website, newsletter, RSS for tracking the popular awesome list by daily and weekly.
    Contact us: [email protected]
    Track Awesome List - Track your favorite Github awesome repos, not just star them | Product Hunt

    Subscribe

    Subscribe to our weekly newsletter to receive the awesome updates! We never send spam and you can unsubscribe instantly with one click. Here's past issues.

    Links

    Follow us on TwitterSubscribe us on TelegramSubmit awesome list repoNewsletterDonateSitemap