You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aya/examples
Nitish Malhotra 8bd8233c96 Add xdp example from book to aya repo
Adding the source for the xdp example from the bookfor easier reference.

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
4 years ago
..
myapp Add xdp example from book to aya repo 4 years ago
myapp-common Add xdp example from book to aya repo 4 years ago
myapp-ebpf Add xdp example from book to aya repo 4 years ago
xtask Add xdp example from book to aya repo 4 years ago
Cargo.toml Add xdp example from book to aya repo 4 years ago
README.md Add xdp example from book to aya repo 4 years ago

README.md

myapp

Prerequisites

  1. Install a rust stable toolchain: rustup install stable
  2. Install a rust nightly toolchain: rustup install nightly
  3. Install bpf-linker: cargo install bpf-linker

Build eBPF

cargo xtask build-ebpf

To perform a release build you can use the --release flag. You may also change the target architecture with the --target flag

Build Userspace

cargo build

Run

sudo target/debug/myapp --path target/bpfel-unknown-none/debug/myapp