GithubHelp home page GithubHelp logo

lschulz / bpf-experiments Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 519 KB

License: GNU General Public License v3.0

Makefile 0.82% C 36.39% C++ 30.91% Python 16.61% Shell 12.91% CMake 2.11% Dockerfile 0.26%
aes ebpf router scion xdp

bpf-experiments's Introduction

BPF Experiments

This repository contains a BPF XDP application intended to accelerate the reference SCION border router by forwarding some common packet types directly in XDP.

Overview

  • /aes Implementation of AES-CMAC for use in XDP as required by SCION.
  • /br The SCION XDP border router.
  • /mac_offload Offload AES-CMAC validation from a switch to XDP.
  • /libbpfpp C++ wrappers for libbpf
  • /libbpfpy Python helpers for interfacing with libbpf
  • /scion Some scripts for testing the XDP router in a dockerized local SCION topology.
  • /utils Helper scripts for running the tests.

Requirements

  • Kernel >= 5.15
    • Ubuntu >= 22.04
    • Ubuntu >= 20.04.5
  • llvm and clang
  • pkg-config
  • libelf
  • patchelf
  • bpftool (linux-tools-common)
  • doctest (doctest-dev)
  • cmake >= 3.16
  • boost >= 1.78
  • Python 3.10

Make sure /usr/include/asm, /usr/include/bits and /usr/include/sys are available. Either install gcc-multilib or manually create symlinks from /usr/include/x86_64-linux-gnu/:

sudo ln -s /usr/include/x86_64-linux-gnu/asm /usr/include/asm
sudo ln -s /usr/include/x86_64-linux-gnu/bits /usr/include/bits
sudo mkdir /usr/include/sys
sudo ln -s /usr/include/x86_64-linux-gnu/sys/* /usr/include/sys

Building

Clone with --recurse-submodules or initialize the submodules after cloning:

git submodule update --init

First build libbpf:

pushd libbpf/src
make
popd

Build the repository by invoking cmake directly

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..
make

or run simply run make.

See the various subdirectories for instructions on how to run tests etc.

bpf-experiments's People

Contributors

lschulz avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.