go-afxdp-l4conn

module
v0.0.0-...-793eddf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: MIT

README

go-afxdp-l4conn

A sample for writing XDP programs in Go

It's best to change this to get started with code for xdp using 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.

./gen_bpf_helper.sh

dev packages install

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

make

Run

./bin/goxdp

# use option
./bin/goxdp --device eth2 --device eth3

Test

make test

Directories

Path Synopsis
cmd
pkg
udp

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL