Skip to content
/ ebpfcca Public

🐝 Evaluating eBPF as a Platform for Congestion Control Algorithm Implementation

Notifications You must be signed in to change notification settings

claby2/ebpfcca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

52 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

eBPF CCA

Evaluating eBPF as a Platform for Congestion Control Algorithm Implementation.

Required packages:

$ sudo apt install clang libbpf-dev bpftool bpfcc-tools libbpfcc libbpfcc-dev linux-headers-$(uname -r)

Running BPF Cubic

Source files were taken from Linux kernel (commit hash: c964ced7726294d40913f2127c3f185a92cb4a41). The following additional modification was made to bpf_cubic.c to satisfy the verifier.

< 	shift = (a >> (b * 3));
---
> 	shift = ((__u32)a >> (b * 3));

Build, register, and set CCA

# Build eBPF program
$ cd bpf_cubic/
$ make build
sudo bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h
clang-14 -target bpf -I/usr/include/-linux-gnu -g -O2 -o bpf_cubic.o -c bpf_cubic.c

# Register eBPF program
$ sudo bpftool struct_ops register bpf_cubic.o
Registered tcp_congestion_ops cubic id 101

# Set TCP congestion control algorithm to bpf_cubic
$ sudo sysctl -w net.ipv4.tcp_congestion_control=bpf_cubic
net.ipv4.tcp_congestion_control = bpf_cubic

Unregister CCA

$ sudo bpftool struct_ops unregister name cubic
Unregistered tcp_congestion_ops cubic id 101

About

🐝 Evaluating eBPF as a Platform for Congestion Control Algorithm Implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published