Skip to content

Commit d04adf4

Browse files
committed
MINOR: quic: implement BBR congestion control algorithm for QUIC
Implement the version 3 of BBR for QUIC specified by the IETF in this draft: https://datatracker.ietf.org/doc/draft-ietf-ccwg-bbr/ Here is an extract from the Abstract part to sum up the the capabilities of BBR: BBR ("Bottleneck Bandwidth and Round-trip propagation time") uses recent measurements of a transport connection's delivery rate, round-trip time, and packet loss rate to build an explicit model of the network path. BBR then uses this model to control both how fast it sends data and the maximum volume of data it allows in flight in the network at any time. Relative to loss-based congestion control algorithms such as Reno [RFC5681] or CUBIC [RFC9438], BBR offers substantially higher throughput for bottlenecks with shallow buffers or random losses, and substantially lower queueing delays for bottlenecks with deep buffers (avoiding "bufferbloat"). BBR can be implemented in any transport protocol that supports packet-delivery acknowledgment. Thus far, open source implementations are available for TCP [RFC9293] and QUIC [RFC9000]. In haproxy, this implementation is considered as still experimental. It depends on the newly implemented pacing feature. BBR was asked in GH #2516 by @KazuyaKanemura, @osevan and @kennyZ96.
1 parent 472d575 commit d04adf4

File tree

4 files changed

+1543
-2
lines changed

4 files changed

+1543
-2
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,8 @@ OPTIONS_OBJS += src/quic_rx.o src/mux_quic.o src/h3.o src/quic_tx.o \
654654
src/cfgparse-quic.o src/qmux_trace.o src/qpack-enc.o \
655655
src/qpack-tbl.o src/h3_stats.o src/quic_stats.o \
656656
src/quic_fctl.o src/cbuf.o src/quic_rules.o \
657-
src/quic_token.o src/quic_pacing.o src/quic_cc_drs.o
657+
src/quic_token.o src/quic_pacing.o src/quic_cc_drs.o \
658+
src/quic_cc_bbr.o
658659
endif
659660
660661
ifneq ($(USE_QUIC_OPENSSL_COMPAT:0=),)

include/haproxy/quic_cc-t.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
extern struct quic_cc_algo quic_cc_algo_nr;
3838
extern struct quic_cc_algo quic_cc_algo_cubic;
39+
extern struct quic_cc_algo quic_cc_algo_bbr;
3940
extern struct quic_cc_algo *default_quic_cc_algo;
4041

4142
/* Fake algorithm with its fixed window */
@@ -81,14 +82,15 @@ struct quic_cc_event {
8182
enum quic_cc_algo_type {
8283
QUIC_CC_ALGO_TP_NEWRENO,
8384
QUIC_CC_ALGO_TP_CUBIC,
85+
QUIC_CC_ALGO_TP_BBR,
8486
QUIC_CC_ALGO_TP_NOCC,
8587
};
8688

8789
struct quic_cc {
8890
/* <conn> is there only for debugging purpose. */
8991
struct quic_conn *qc;
9092
struct quic_cc_algo *algo;
91-
uint32_t priv[20];
93+
uint32_t priv[158];
9294
};
9395

9496
struct quic_cc_path {
@@ -118,6 +120,8 @@ struct quic_cc_path {
118120
/* Burst size if pacing is used. Not used if congestion algo handle pacing itself. */
119121
uint32_t pacing_burst;
120122
uint64_t delivery_rate; /* bytes per second */
123+
size_t send_quantum;
124+
uint32_t recovery_start_ts;
121125
};
122126

123127
struct quic_cc_algo {

include/haproxy/quic_cc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ static inline void quic_cc_path_init(struct quic_cc_path *path, int ipv4, unsign
101101
path->pacing_burst = burst;
102102
quic_cc_init(&path->cc, algo, qc);
103103
path->delivery_rate = 0;
104+
path->send_quantum = 64 * 1024;
105+
path->recovery_start_ts = TICK_ETERNITY;
104106
}
105107

106108
/* Return the remaining <room> available on <path> QUIC path for prepared data

0 commit comments

Comments
 (0)