Skip to content

Commit

Permalink
WIP: quic: implement BBR.
Browse files Browse the repository at this point in the history
  • Loading branch information
haproxyFred committed Sep 5, 2024
1 parent 204194f commit 0582778
Show file tree
Hide file tree
Showing 4 changed files with 1,062 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ OPTIONS_OBJS += src/quic_rx.o src/mux_quic.o src/h3.o src/quic_tx.o \
src/cfgparse-quic.o src/qmux_trace.o src/qpack-enc.o \
src/qpack-tbl.o src/h3_stats.o src/quic_stats.o \
src/quic_fctl.o src/cbuf.o src/quic_rules.o \
src/quic_token.o src/quic_cc_drs.o
src/quic_token.o src/quic_cc_drs.o src/quic_cc_bbr.o
endif
ifneq ($(USE_QUIC_OPENSSL_COMPAT:0=),)
Expand Down
3 changes: 3 additions & 0 deletions include/haproxy/quic_cc-t.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

extern struct quic_cc_algo quic_cc_algo_nr;
extern struct quic_cc_algo quic_cc_algo_cubic;
extern struct quic_cc_algo quic_cc_algo_bbr;
extern struct quic_cc_algo *default_quic_cc_algo;

/* Fake algorithm with its fixed window */
Expand Down Expand Up @@ -81,6 +82,7 @@ struct quic_cc_event {
enum quic_cc_algo_type {
QUIC_CC_ALGO_TP_NEWRENO,
QUIC_CC_ALGO_TP_CUBIC,
QUIC_CC_ALGO_TP_BBR,
QUIC_CC_ALGO_TP_NOCC,
};

Expand Down Expand Up @@ -116,6 +118,7 @@ struct quic_cc_path {
/* Number of in flight ack-eliciting packets. */
uint64_t ifae_pkts;
uint64_t delivery_rate; /* bytes per second */
size_t send_quantum;
};

struct quic_cc_algo {
Expand Down
1 change: 1 addition & 0 deletions include/haproxy/quic_cc.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ static inline void quic_cc_path_init(struct quic_cc_path *path, int ipv4, unsign
path->ifae_pkts = 0;
quic_cc_init(&path->cc, algo, qc);
path->delivery_rate = 0;
path->send_quantum = path->mtu * 10;
}

/* Return the remaining <room> available on <path> QUIC path for prepared data
Expand Down
Loading

0 comments on commit 0582778

Please sign in to comment.