Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aibor/cpumap-loop
Example program show casing eBPF cpumap infinite loop
https://github.com/aibor/cpumap-loop
ebpf xdp
Last synced: 24 days ago
JSON representation
Example program show casing eBPF cpumap infinite loop
- Host: GitHub
- URL: https://github.com/aibor/cpumap-loop
- Owner: aibor
- Created: 2024-03-01T20:08:37.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-03-01T23:01:05.000Z (8 months ago)
- Last Synced: 2024-09-29T04:20:55.471Z (about 1 month ago)
- Topics: ebpf, xdp
- Language: C
- Homepage:
- Size: 223 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSES/GPL-3.0-or-later.txt
Awesome Lists containing this project
README
# cpumap_loop
This is a very simple example eBPF/XDP program, that utilizes a CPU infintiely
with a single packet.![cpumap_loop](cpumap_loop.gif)
## Requirements
* clang (tested with clang v16, at least v11 or later should work, though)
* libbpf## Build
Either run make on your system:
```
$ make
```Or use the container to build:
```
docker build --rm -t clbuild .
docker run --rm --volume $(pwd):/build clbuild
```## Run
__Warning: Running the program results in CPU 0 being busy for about a minute.__
```
$ ./cpumap_loop
```