This Linux kernel module brings the original BBRv1 back as bbr_classic, so you can use both BBRv1 and BBRv2/3 side by side.
Why this: On BBRv2/3-patched kernels (e.g. CachyOS, TKG, Zen, Liquorix, and Xanmod), BBRv1 is replaced by BBRv2/3.
Builds and installs as kernel module. Requires kernel headers.
git clone https://github.com/damachine/bbr_classic-multi.git
cd bbr_classic-multi
make # download tcp_bbr.c and build the module
sudo make install # install module permanently (no DKMS)git clone https://github.com/damachine/bbr_classic-multi.git
cd bbr_classic-multi
sudo make dkms-installUninstall:
sudo make dkms-uninstallgit clone https://github.com/damachine/bbr_classic-multi.git
cd bbr_classic-multi
makepkg -siUninstall:
pacman -R bbr-classic-dkms# load module
sudo modprobe tcp_bbr_classic
# set Qdisc and congestion control algorithm
sudo sysctl -w net.core.default_qdisc=fq
sudo sysctl -w net.ipv4.tcp_congestion_control=bbr_classicVerify:
# check module info
modinfo tcp_bbr_classic
# check module is loaded
lsmod | grep bbr_classic
# check congestion control algorithm and Qdisc
sysctl net.ipv4.tcp_congestion_control
sysctl net.core.default_qdisc# add sysctl config file for persistent settings
sudo tee /etc/sysctl.d/99-bbr-classic.conf << EOF
# Set Qdisc (Fair Queue)
net.core.default_qdisc=fq
# Enable BBR Classic as TCP Congestion Control
net.ipv4.tcp_congestion_control=bbr_classic
EOF
# reload sysctl settings
sudo sysctl --systemRequires iperf3 and a server that allows selecting the congestion control algorithm.
# compare against BBRv3
iperf3 -c <server> -C bbr
# test BBR Classic
iperf3 -c <server> -C bbr_classicSee also: [CachyOS/linux-cachyos#706] for benchmark results.
Build tcp_bbr_classic.c from tcp_bbr.c source:
- The unmodified BBRv1 source
tcp_bbr.cis downloaded from the main Linux tree
Patches in tcp_bbr_classic.c:
-
renames string literal "bbr" to "bbr_classic" for new congestion control name
-
renames struct bbr to avoid symbol conflicts with in-tree BBRv3
-
replaces BTF kfunc registration with a no-op (CONFIG_DEBUG_INFO_BTF_MODULES compatibility)
-
checks for BBRv3 kernels
The BBRv1 algorithm itself is untouched.
Original idea and approach by cmspam/bbr_classic.
GPL-2.0