https://github.com/aibor/cpumap-loop
Example program show casing eBPF cpumap infinite loop
https://github.com/aibor/cpumap-loop
ebpf xdp
Last synced: 6 months 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 (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-01T23:01:05.000Z (over 2 years ago)
- Last Synced: 2025-01-21T04:28:10.282Z (over 1 year 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.

## 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
```