GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - feiskyer/ebpf-apps: 极客时间专栏《eBPF 核心技术与实战》案例

BranchesTags
Open more actions menu

Latest commit

 

History

50 Commits
50 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
bcc-apps
bcc-apps
 
 
bpf-apps
bpf-apps
 
 
bpftrace
bpftrace
 
 
chatgpt
chatgpt
 
 
go
go
 
 
kernel
kernel
 
 
libbpf @ 09b9e83
libbpf @ 09b9e83
 
 
loadbalancer
loadbalancer
 
 
rust
rust
 
 
tools
tools
 
 
windows
windows
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

ebpf-apps

eBPF sample apps based on BCC, libbpf and various language bindings.

Contents

  • bcc-apps: eBPF samples with BCC.
    • bcc-apps/c: BCC samples with C binding.
    • bcc-apps/cpp: BCC samples with C++ binding.
    • bcc-apps/python: BCC samples with Python binding.
  • bpf-apps: eBPF samples with libbpf and CO-RE.
  • bpftrace: eBPF samples with bpftrace.
  • go: eBPF samples with Go bindings.
  • kernel: eBPF samples built with kernel source.
  • rust: eBPF samples with Rust bindings.
  • tools: Tools for eBPF (e.g. bpftool and faddr2line).
  • chatgpt: generating eBPF programs with ChatGPT.

Pre-requisites

BCC

BCC and its development libraries should be installed.

Install from packages

Please follow INSTALL.md to see the detailed guides. For example, on Ubuntu or RHEL:

# Ubuntu
sudo apt-get install bpfcc-tools libbpfcc-dev linux-headers-$(uname -r)

# RHEL
sudo yum install bcc-tools bcc-devel

Install from source

Please follow INSTALL.md to see the detailed guides. For example, on Ubuntu 20.04+:

sudo apt install -y bison build-essential cmake flex git libedit-dev llvm-dev libclang-dev python zlib1g-dev libelf-dev libfl-dev python3-distutils

git clone https://github.com/iovisor/bcc.git
mkdir bcc/build; cd bcc/build
cmake ..
make
sudo make install
cmake -DPYTHON_CMD=python3 .. # build python3 binding
pushd src/python/
make
sudo make install
popd

libbpf with CO-RE

To use BTF and CO-RE, CONFIG_DEBUG_INFO_BTF=y and CONFIG_DEBUG_INFO_BTF_MODULES=y need to be enabled. If you don't want to rebuild the kernel, the following distos have enabled those options by default:

  • Ubuntu 20.10+
  • Fedora 31+
  • RHEL 8.2+
  • Debian 11+

And to build bpf applications, the following development tools should also be installed:

# Ubuntu
sudo apt-get install -y make clang llvm libelf-dev linux-tools-$(uname -r)

# RHEL
sudo yum install -y make clang llvm elfutils-libelf-devel bpftool

Useful Links

  • 极客时间专栏《eBPF 核心技术与实战》
  • eBPF.io
  • Linux kernel BPF samples
  • BPF and XDP Reference Guide
  • XDP Hands-On Tutorial

About

极客时间专栏《eBPF 核心技术与实战》案例

Topics

bccebpflibbpf

Resources

Readme
Apache-2.0 license
Activity

Stars

384 stars

Watchers

10 watching

Forks

116 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.