Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel: Turn on TCP_CONG_ADVANCED which allows TCP BBR to be a module. #48604

Closed
wants to merge 1 commit into from

Conversation

c00w
Copy link
Contributor

@c00w c00w commented Oct 17, 2018

It looks like TCP_CONG_ADVANCED gates the TCP BBR module.

Motivation for this change

This allows people to use the TCP BBR module by twiddling sysctl. Without this, they are required to rebuild the entire kernel. I personally want to use TCP BBR which is why I'm adding this change.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

It looks like TCP_CONG_ADVANCED gates the TCP BBR module.
@ivan
Copy link
Member

ivan commented Oct 17, 2018

Which kernel were you testing? NixOS 18.09's Linux 4.14 seems to include BBR:

[root@hydra:~]# sysctl net.ipv4.tcp_congestion_control=bbr
net.ipv4.tcp_congestion_control = bbr

[root@hydra:~]# sysctl -a | grep cong
net.ipv4.tcp_allowed_congestion_control = bbr reno
net.ipv4.tcp_available_congestion_control = bbr reno
net.ipv4.tcp_congestion_control = bbr

[root@hydra:~]# ls -l /nix/store/jbkvclfhacpzn0xhpn1w5552zyj0892q-linux-4.14.76/lib/modules/4.14.76/kernel/net/ipv4/tcp_bbr.ko.xz
-r--r--r-- 1 root root 4272 Jan  1  1970 /nix/store/jbkvclfhacpzn0xhpn1w5552zyj0892q-linux-4.14.76/lib/modules/4.14.76/kernel/net/ipv4/tcp_bbr.ko.xz

@c00w
Copy link
Contributor Author

c00w commented Oct 19, 2018

Hmmm - 4.18 doesn't seem to have it enabled.

% uname -r ~
4.18.12
% sudo sysctl -a | grep cong ~
net.ipv4.tcp_allowed_congestion_control = reno
net.ipv4.tcp_available_congestion_control = reno
net.ipv4.tcp_congestion_control = reno
% sudo sysctl net.ipv4.tcp_congestion_control=bbr ~
sysctl: setting key "net.ipv4.tcp_congestion_control": No such file or directory
net.ipv4.tcp_congestion_control = bbr

@c00w
Copy link
Contributor Author

c00w commented Oct 30, 2018

Any update? Should I write a test to cover this?

@tomberek
Copy link
Contributor

@c00w still needed? or close and solve with going to 4.19?

@ajs124
Copy link
Member

ajs124 commented Apr 10, 2019

I'm on 19.03 with the default kernel and I'm getting this:

uname -r                                                                                                                                                                                                                                              
4.19.34

sudo sysctl -a | grep cong
net.ipv4.tcp_allowed_congestion_control = reno
net.ipv4.tcp_available_congestion_control = reno
net.ipv4.tcp_congestion_control = reno

So, this still seems to be an issue.

@ivan
Copy link
Member

ivan commented Apr 10, 2019

I am using nixpkgs master with the hardened 4.19 kernel and

  boot.kernel.sysctl = {
    "net.core.default_qdisc"             = "fq";
    "net.ipv4.tcp_congestion_control"    = "bbr";
  };

works fine for me.

net.ipv4.tcp_allowed_congestion_control = reno bbr
net.ipv4.tcp_available_congestion_control = reno bbr
net.ipv4.tcp_congestion_control = bbr

@ajs124
Copy link
Member

ajs124 commented Apr 10, 2019

You're right, seems like I just didn't have the module loaded, sorry.

@c00w
Copy link
Contributor Author

c00w commented Apr 12, 2019

Seems to be working with 5.0.3. I'll drop the PR

colin@akira ~ % uname -r ~
5.0.3
colin@akira ~ % modprobe tcp_bbr ~
colin@akira ~ % sudo sysctl -a | grep cong ~
net.ipv4.tcp_allowed_congestion_control = reno bbr
net.ipv4.tcp_available_congestion_control = reno bbr
net.ipv4.tcp_congestion_control = bbr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants