TCP BBR support

Hi there,

Is TCP BBR supported or will it be supported soon?

Ref:
(1) https://patchwork.ozlabs.org/patch/671069/
(2) http://blog.cerowrt.org/post/bbrs_basic_beauty/

Hi,

to answer the first part of your question: BBR support starts with Linux Kernel 4.9 and Lede is currently using Linux Kernel 4.4.

Not possible to backport the BBR patch ?

btw, it's a common misunderstanding that changing the TCP congestion algorithm on a router will bring any benefits... you have to change it on the senders side, e.g. a web server.

1 Like

Since the upcoming release will stick to 4.4, and we're in the pre-release phase, I don't see it being backported. No idea what master will move to for the next kernel, but I thought 4.10 would be another LTS.

Thanks. I guess we will need to wait a bit to be able to test this beauty.

4.9, not 4.10.

mmm Maybe it would not be so difficult to backport this. The patch only added a few new lines and one file:

include/uapi/linux/inet_diag.h | 13 +
net/ipv4/Kconfig | 18 +
net/ipv4/Makefile | 1 +
net/ipv4/tcp_bbr.c | 875 +++++++++++++++++++++++++++++++++++++++++
4 files changed, 907 insertions(+)

Which means that if the interface(s) did not change between 4.4 and 4.9 it should work.

There might be more to it? Take a look here: https://groups.google.com/d/msg/bbr-dev/b-7NW-ACb5U/9isgWUYNEQAJ
And possible here: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/?qt=grep&q=tcp_bbr

Trunk now has preliminary 4.9 support, if you're feeling adventurous :slight_smile:

Great! I'll give it a try - it is cold and rainy here anyway. I thought 4.9 was a few parsec away...

I think that only the basic 4.9 generic support has been added, but no platform has yet got its patches modified for 4.9. so you need to adapt e.g. ar71xx patches and config defaults for 4.9

i live in a very old Eastern country where has no real Internet but a big LAN.
i want to make a household proxy router with LEDE to bypass the Great Firewall.
without tcp_bbr the tcp speed is only below 20KB/s.:joy:
when will LEDE upgrade to kernal 4.9?

The LEDE buildbot snapshots from the master branch are already at kernel 4.9 for most targets.
Try a buildbot snapshot or build your own with the required options.
http://downloads.lede-project.org/snapshots/targets/

(latest official stable release 17.01.4 is naturally still from the kernel 4.4.)

Thank you for your replay.
i have tried x86 build openwrt-x86-generic-combined-ext4.img.gz in vmware. configure bbr failed with this script:

echo "net.core.default_qdisc = fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control = bbr" >> /etc/sysctl.conf
sysctl -p
sysctl net.ipv4.tcp_available_congestion_control

don't konw why :confused:.

I found latest kernel 4.9 source files miss tcp_bbr.c,
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=0f8782ea14974ce992618b55f0c041ef43ed0b78
, without doubt ,no tcp_bbr.ko module was built when building image.
module sched_fq.ko also missed.

i was wrong, if mark CONFIG_TCP_CONG_BBR=y, bbr will build into image. no tcp_bbr.ko needed.

I was reading up on this development and it seems to be the latest thing. Performance should improve especially on connections like mine 200/20.

I also read VPN would improve, but since this is a TCP patch, does that mean I need to change my OpenVPN port from UDP to TCP on the server side and on the client side no BBR patch required? For the rest of use using VPN client only, even selecting TCP would not make a difference because it’s a server side improvement, correct?

In short: the VPN server and client must have enabled/implemented/active BBR in the kernel (no matter if the module is embedded in the kernel or loaded during the system boot) correctly configured file /etc/sysctl.conf (or any other suitable for the given sysctl file system) - otherwise it will not work.
As for TCP or UDP, I'm not sure.

Sounds good; I will give it a try. It’s Lede to Lede site-to-site, I could even change to TCP if that improves throughput.