The goal of this project is to implement BC-PQP using eBPF in XDP.
We use make and bash to run commands, so you will need to have those installed. The entire build process then happens inside docker/podman (you only need one of the two), also tar is used to extract some files from the image which are needed to later run this image as a VM. To compile the code and build a container which can later be used to execute the eBPF program inside a VM, run
make containerIf you wish to compile the code on your host (and not in a container), you can run
make buildThis will generate 2 object files for each source file: one with logging statements enabled, one without. For a list of build dependencies, please refer to the build stage of our Dockerfile
We use virt-manager to launch a VM where we can then load and test bc-pqp-ebpf. To route traffic through this VM we also set up some network interfaces on your host (for more info see the script). For both of these things you will need to have root access to your host.
To launch the VM, run
make qemuThe VM will launch and attach a TTY to your terminal. Once startup is complete, you will be automatically logged in as root to the VM. All build artifacts as well as some helper scripts are located in the home directory. To load bc-pqp-ebpf into the VM, run
./load.sh # loads simple-bc-pqp-ebpf-kernel.o by default
# or
# ./load.sh sharded-bc-pqp-ebpf-kernel.o
# run the following to insert the program with logs enabled
# ./load.sh debug_simple-bc-pqp-ebpf-kernel.o
# the logs can then be viewed by running
# ./logs.sh
# To do both of these things at once, run
# ./watch.sh debug_simple-bc-pqp-ebpf-kernel.oBuilding the code and starting the VM can also be done with one command:
makeWe provide some test suites to verify the behavior of bc-pqp-ebpf. These scripts use (depending on the suite) iperf3, ping, flent and tcpdump.
To get started, first build and run the VM as described above. Then run your desired test suite (from your host, not from the VM) by invoking the desired subcommand of the ./scripts/suites.sh script.
For an overview of available suites, run
./scripts/suites.sh --helpSPDX-License-Identifier: GPL-2.0-or-later