Skip to content

Commit

Permalink
tcp: Add the TCP Prague congestion control module
Browse files Browse the repository at this point in the history
TCP Prague is a variant of DCTCP aimed to be used over the public
Internet. As such, it implements a couple of safety requirements and
uses the ECT(1) ECN codepoint, as defined in the L4S experiment.

This base version enhances DCTCP by:
- Requesting the use of ECT(1) for all packets.
- Supporting various RTT independence modes
- Updating the EWMA to support low marking probabilities
- Improved the accuracy of the cwnd manipulations, notably preserving
  remainders
- Switching to unsaturated marking during additive increase
- Controlling pacing/GSO sizing

See:
https://tools.ietf.org/html/draft-ietf-tsvwg-ecn-l4s-id-09#page-23
https://tools.ietf.org/html/draft-ietf-tsvwg-l4s-arch-05
https://arxiv.org/abs/1904.07605

Signed-off-by: Chia-Yu Chang <[email protected]>
Signed-off-by: Olivier Tilmans <[email protected]>
Signed-off-by: Koen De Schepper <[email protected]>
Signed-off-by: Bob Briscoe <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>
  • Loading branch information
minuscat committed Aug 21, 2024
1 parent 845351f commit 4c8b485
Show file tree
Hide file tree
Showing 4 changed files with 812 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/uapi/linux/inet_diag.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ enum {
INET_DIAG_SK_BPF_STORAGES,
INET_DIAG_CGROUP_ID,
INET_DIAG_SOCKOPT,
INET_DIAG_PRAGUEINFO,
__INET_DIAG_MAX,
};

Expand Down Expand Up @@ -231,9 +232,22 @@ struct tcp_bbr_info {
__u32 bbr_cwnd_gain; /* cwnd gain shifted left 8 bits */
};

/* INET_DIAG_PRAGUEINFO */

struct tcp_prague_info {
__u64 prague_alpha;
__u64 prague_frac_cwnd;
__u64 prague_rate_bytes;
__u32 prague_max_burst;
__u32 prague_round;
__u32 prague_rtt_target;
bool prague_enabled;
};

union tcp_cc_info {
struct tcpvegas_info vegas;
struct tcp_dctcp_info dctcp;
struct tcp_prague_info prague;
struct tcp_bbr_info bbr;
};
#endif /* _UAPI_INET_DIAG_H_ */
13 changes: 13 additions & 0 deletions net/ipv4/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,15 @@ config TCP_CONG_BBR
AQM schemes that do not provide a delay signal. It requires the fq
("Fair Queue") pacing packet scheduler.

config TCP_CONG_PRAGUE
tristate "TCP Prague"
default n
help
TCP Prague is an enhancement for DCTCP to make DCTCP congestion
control deployable into general Internet.

To be completed ...

choice
prompt "Default TCP congestion control"
default DEFAULT_CUBIC
Expand Down Expand Up @@ -716,6 +725,9 @@ choice
config DEFAULT_BBR
bool "BBR" if TCP_CONG_BBR=y

config DEFAULT_PRAGUE
bool "Prague" if TCP_CONG_PRAGUE=y

config DEFAULT_RENO
bool "Reno"
endchoice
Expand All @@ -740,6 +752,7 @@ config DEFAULT_TCP_CONG
default "dctcp" if DEFAULT_DCTCP
default "cdg" if DEFAULT_CDG
default "bbr" if DEFAULT_BBR
default "prague" if DEFAULT_PRAGUE
default "cubic"

config TCP_SIGPOOL
Expand Down
1 change: 1 addition & 0 deletions net/ipv4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ obj-$(CONFIG_TCP_CONG_SCALABLE) += tcp_scalable.o
obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o
obj-$(CONFIG_TCP_CONG_YEAH) += tcp_yeah.o
obj-$(CONFIG_TCP_CONG_ILLINOIS) += tcp_illinois.o
obj-$(CONFIG_TCP_CONG_PRAGUE) += tcp_prague.o
obj-$(CONFIG_TCP_SIGPOOL) += tcp_sigpool.o
obj-$(CONFIG_NET_SOCK_MSG) += tcp_bpf.o
obj-$(CONFIG_BPF_SYSCALL) += udp_bpf.o
Expand Down
Loading

0 comments on commit 4c8b485

Please sign in to comment.