Raspberry Pi 5 (bcm2712) or Pi 4B (bcm2711) for L4S Build Notes (Sept 23, 2024)
This is not an endorsement of L4S but the expected use is for technical evaluations.
Help towards building a kernel which is L4S capable, dual queue and runs on a raspberry pi 4 or 5 (5 is higher performing and can drive 2.5G USB ethernet.) These devices can also be used as a dual queue L4S marking plane. (per the use of iproute2) The devices are assumed to be used for experimental, wired & wireless testing purposes and not on production networks.
Please read the following disclaimer.
Raspberry Pi 4B of Pi 5 – two or more, 8G RAM is suggested
Multiport power supply, e.g. min 5V 3A or 15W per port for Rpi, 60W for laptop
USB A to C cords for Rpi power, 1ft or so
64G Micro SD card(s)
Micro HDMI cable(s)
HDMI monitor
USB keyboard and mouse
USB adapter (or equivalent) for micro SD card
Optional USB 2.5G ethernet adapters (two as the fowarding plane)
Optional NVME hat with SSD card
Optional 8 port VLAN switch (e.g Netgear ProSAFE GS108E)
Optional USB C cord with power switch
Optional RPi 4B case
Optional GPS hat for pulse per second (not documented here)
Optional SD card holder/case
or linux dd
gzip & gunzip
Internet access to the Rpi
Ethernet switch
L4S forwarding plane that does marking (not documented here)
Create a full debian bullseye system with 64 bit support, using a 64G micro SD card
Download the bullseye image from here or from debian.
Use rasberry pi imager to write to a 64G card, it will destroy all existing data
Install the card into a raspberry pi 4 with wired ethernet attached
Boot card and follow initial setup including creating a user id, and system updates
Reboot, set root password with ‘sudo passwd’
optionally ‘sudo apt-get install firefox-esr’
optionally enable ssh via ‘systemctl start ssh” & ‘systemctl enable ssh’
Install build tools
sudo apt install raspberrypi-kernel-headers build-essential bc git wget bison flex libssl-dev make libncurses-dev
sudo apt install emacs automake
Get the sourced code for 6.6 kernel: git clone https://github.com/minuscat/rpi-6.6.y.git
Go into kernel directory: cd rpi-6.6.y/
Review the url on building rpi kernels
Set the KERNEL environment variable to a unique value (this is just an example): KERNEL=kernel_2712_l4s
Make a Rpi5 config: make bcm2712_defconfig
Set prague CCA & dual queue kernel flags: make menuconfig
Set CONFIG_LOCALVERSION environment variable to a unique value: CONFIG_LOCALVERSION="-l4s-kernel"
Compile kernel, modules, device tree blobs: make -j6 Image.gz modules dtbs
Install modules: make -j6 modules_install
rjmcmahon@raspberrypi:~ $ cd /usr/local/src
rjmcmahon@raspberrypi:/usr/local/src $ su
git clone https://github.com/google/bbr.git
Checkout l4s branch
cd bbr
git checkout l4s-testing-2023-02-23-v3
Download bcm2711_defconfig from this site
copy into .config
copy into arch/arm64/configs/bcm2711_defconfig (optional)
make menuconfig
check platform as Broadcom BCM2835 family
Verify Networking support > Networking options > TCP: advanced congestion control
make -j4 Image modules
wait awhile (like at 87 minutes)
make modules_install
make install
emacs /boot/config.txt
kernel=vmlinuz-5.15.72-v8+
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
or sudo systemctl set-default multi-user.target
reboot
Uname -r
rjmcmahon@raspberrypi:~ $ uname -r
5.15.72-v8+
systctl -a | grep avail
rjmcmahon@raspberrypi:~ $
sudo sysctl -a | grep avail
kernel.random.entropy_avail = 256
kernel.seccomp.actions_avail = kill_process kill_thread trap errno user_notif trace log allow
net.ipv4.tcp_available_congestion_control = reno bbr bbr2 cubic dctcp vegas prague
net.ipv4.tcp_available_ulp =
Configuration
for Testing
You
can configure the test machine with the following commands.
Enabling Accurate ECN
sysctl net.ipv4.tcp_ecn=3
Enabling BBRv2 CC w/ Accurate ECN
sysctl net.ipv4.tcp_ecn=3 net.ipv4.tcp_congestion_control=bbr2
Enabling TCP Prague CC w/ Accurate ECN
sysctl net.ipv4.tcp_ecn=3 net.ipv4.tcp_congestion_control=prague
Enabling CUBIC CC w/ Accurate ECN
sysctl net.ipv4.tcp_ecn=3 net.ipv4.tcp_congestion_control=cubic
Enabling CUBIC CC w/o Accurate ECN
sysctl net.ipv4.tcp_ecn= net.ipv4.tcp_congestion_control=cubic
cd /usr/local/src
git clone https://git.code.sf.net/p/iperf2/code iperf2-code
cd iperf2-code
.configure
make -j 4
make install
wget https://go.dev/dl/go1.20.6.linux-arm64.tar.gz
tar -C /usr/local/ -xvf go1.20.6.linux-arm64.tar.gz
tar -C /usr/local -xzf go1.20.6.linux-arm64.tar.gz
export PATH=$PATH:/usr/local/go/bit
type go
go version
cd goresponsiveness/
go mod download
go build networkQuality.go
Iperf 2 TCP CCA up stream
[rjmcmahon@ryzen3950 L4S]$ sudo dd bs=4M if=/dev/sdc of=l4s_kernel conv=fsync
[sudo] password for rjmcmahon:
15226+1 records in
15226+1 records out
63864569856 bytes (64 GB, 59 GiB) copied, 692.6 s, 92.2 MB/s