Why do I need BBR support on Raspberry Pi

I use my Raspberry Pi at home as a proxy server. BBR makes significant speed improvement in my tests.

Why is Raspberry Pi special

Raspberry Pi doesn’t support grub, so the normal kernel deb package can’t be installed on it. I tried rpi-update to install Linux kernel 4.9, however, it doesn’t include BBR support.

How to solve this

I managed to add BBR support by compiling kernel modules and installing them.

The procedure

1. Clone the source code.

git clone --depth=1 https://github.com/raspberrypi/linux -b rpi-4.9.y

2. Install toolchain

git clone https://github.com/raspberrypi/tools

Then add tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin to PATH.

3. Configure

cd linux
KERNEL=kernel
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig

Then edit .config

CONFIG_TCP_CONG_BBR=m
CONFIG_NET_SCH_FQ=m

4. Compile the modules

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- prepare
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- SUBDIRS=net/ipv4 modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- SUBDIRS=net/sched modules

5. Install the .ko files

Copy the .ko files to /lib/modules/.../

6. Load the modules

depmod

7. Check if succeeded

modprobe tcp_bbr

8. Switch to BBR

sysctl net.ipv4.tcp_congestion_control=bbr
sysctl net.core.default_qdisc=fq

References

KERNEL BUILDING
CONFIGURING THE KERNEL
Examples on how to build various modules

Add BBR support to Raspberry Pi (Raspbian)

Leave a Reply

Your email address will not be published. Required fields are marked *