https://github.com/bpf-endeavor/ebpf-arena-tutorial
A tutorial/example on how to use the eBPF Arena maps
https://github.com/bpf-endeavor/ebpf-arena-tutorial
ebpf xdp
Last synced: 12 months ago
JSON representation
A tutorial/example on how to use the eBPF Arena maps
- Host: GitHub
- URL: https://github.com/bpf-endeavor/ebpf-arena-tutorial
- Owner: bpf-endeavor
- License: gpl-3.0
- Created: 2025-02-05T15:04:55.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-25T09:56:52.000Z (over 1 year ago)
- Last Synced: 2025-06-27T22:03:46.187Z (12 months ago)
- Topics: ebpf, xdp
- Language: C
- Homepage:
- Size: 44.9 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# eBPF Arena Tutorail
This repository shares some examples of using Arena MAP (`BPF_MAP_TYPE_ARENA`)
Read more [here](https://fshahinfar1.github.io/blog/04_ebpf_arena/build/blog.html)
> Tested on kernel 6.9.3 and compiled with clang-19
## How to use
First load the `kmod` (defines a kfunc). Then run the loader.
**Loading kmod:**
1. Use make to compile `kmod/`
2. Use `make load` to load the module
**Running the loader:**
1. Use make to compile the eBPF program and the loader
2. `sudo ./build/mogu_loader.o` to run the loader
3. eBPF logs are shown at `/sys/kernel/tracing/trace_pipe`
4. Send signals to the loader for invoking each eBPF program
- Mogu: `pkill -SIGUSR1 mogu_loader`
- Aloe: `pkill -SIGUSR2 mogu_loader`