Skip to content

Commit 2253d8e

Browse files
author
Valentin Obst
committed
net/tcp: add Rust implementation of CUBIC
CUBIC is the default CCA since 2.6.18. Missing features compared to the C implementation: - configuration via module parameters, - exporting callbacks to BPF programs as kfuncs. Changes compared to the C implementation: - uses only SI units for time, i.e., no jiffies and `BICTCP_HZ`, Signed-off-by: Valentin Obst <[email protected]>
1 parent 67c08f7 commit 2253d8e

File tree

3 files changed

+524
-0
lines changed

3 files changed

+524
-0
lines changed

net/ipv4/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,15 @@ config TCP_CONG_CUBIC
526526
among other techniques.
527527
See http://www.csc.ncsu.edu/faculty/rhee/export/bitcp/cubic-paper.pdf
528528

529+
config TCP_CONG_CUBIC_RUST
530+
tristate "CUBIC TCP (Rust rewrite)"
531+
depends on RUST_TCP_ABSTRACTIONS
532+
help
533+
Rust rewrite of the original implementation of TCP CUBIC congestion
534+
control.
535+
536+
If unsure, say N.
537+
529538
config TCP_CONG_WESTWOOD
530539
tristate "TCP Westwood+"
531540
default m
@@ -719,6 +728,9 @@ choice
719728
config DEFAULT_CUBIC
720729
bool "Cubic" if TCP_CONG_CUBIC=y
721730

731+
config DEFAULT_CUBIC_RUST
732+
bool "Cubic (Rust)" if TCP_CONG_CUBIC_RUST=y
733+
722734
config DEFAULT_HTCP
723735
bool "Htcp" if TCP_CONG_HTCP=y
724736

@@ -759,6 +771,7 @@ config DEFAULT_TCP_CONG
759771
default "bic" if DEFAULT_BIC
760772
default "bic_rust" if DEFAULT_BIC_RUST
761773
default "cubic" if DEFAULT_CUBIC
774+
default "cubic_rust" if DEFAULT_CUBIC_RUST
762775
default "htcp" if DEFAULT_HTCP
763776
default "hybla" if DEFAULT_HYBLA
764777
default "vegas" if DEFAULT_VEGAS

net/ipv4/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ obj-$(CONFIG_TCP_CONG_BIC) += tcp_bic.o
4949
obj-$(CONFIG_TCP_CONG_BIC_RUST) += tcp_bic_rust.o
5050
obj-$(CONFIG_TCP_CONG_CDG) += tcp_cdg.o
5151
obj-$(CONFIG_TCP_CONG_CUBIC) += tcp_cubic.o
52+
obj-$(CONFIG_TCP_CONG_CUBIC_RUST) += tcp_cubic_rust.o
5253
obj-$(CONFIG_TCP_CONG_DCTCP) += tcp_dctcp.o
5354
obj-$(CONFIG_TCP_CONG_WESTWOOD) += tcp_westwood.o
5455
obj-$(CONFIG_TCP_CONG_HSTCP) += tcp_highspeed.o

0 commit comments

Comments
 (0)