Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/takehaya/goxdp-template
A sample for writing XDP programs in Go
https://github.com/takehaya/goxdp-template
ebpf go golang network-programming vxlan xdp
Last synced: 2 months ago
JSON representation
A sample for writing XDP programs in Go
- Host: GitHub
- URL: https://github.com/takehaya/goxdp-template
- Owner: takehaya
- License: mit
- Created: 2021-01-25T14:34:13.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-10T07:27:21.000Z (about 1 year ago)
- Last Synced: 2024-06-20T10:14:44.411Z (7 months ago)
- Topics: ebpf, go, golang, network-programming, vxlan, xdp
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 26
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# goxdp
A sample for writing XDP programs in GoIt's best to change this to get started with code for xdp using [cilium/ebpf](https://github.com/cilium/ebpf).
## Build
In today's Linux, bpf_helper_defs.h is supposed to build.
If you hit this script accordingly, it will fetch the kernel code and build it.
Please use according to your kernel version.
There is no problem with the first execution.```shell
./gen_bpf_helper.sh
```dev packages install
```shell
sudo apt install clang llvm libelf-dev build-essential linux-headers-$(uname -r) linux-libc-dev libbpf-dev gcc-multilib clang-format
```Let's build go & ebpf
```shell
make
```## Run
```shell
./bin/goxdp# use option
./bin/goxdp --device eth2 --device eth3
```## Test
```shell
make test
```