Skip to content

Commit 7bbe882

Browse files
committed
MINOR: quic: Add the congestion window initial value to QUIC path
Add ->initial_wnd new member to quic_cc_path struct to keep the initial value of the congestion window. This member is initialized as soon as a QUIC connection is allocated. This modification is required for BBR congestion control algorithm.
1 parent 5ebecbe commit 7bbe882

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

include/haproxy/quic_cc-t.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ struct quic_cc_path {
9999

100100
/* MTU. Must be constant for GSO support. */
101101
const size_t mtu;
102+
/* Initial congestion window. */
103+
uint64_t initial_wnd;
102104
/* Congestion window. */
103105
uint64_t cwnd;
104106
/* The current maximum congestion window value reached. */

include/haproxy/quic_cc.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ static inline void quic_cc_path_init(struct quic_cc_path *path, int ipv4, unsign
9090
max_dgram_sz = ipv4 ? QUIC_INITIAL_IPV4_MTU : QUIC_INITIAL_IPV6_MTU;
9191
quic_loss_init(&path->loss);
9292
*(size_t *)&path->mtu = max_dgram_sz;
93-
path->cwnd = QUIC_MIN(10 * max_dgram_sz, QUIC_MAX(max_dgram_sz << 1, 14720U));
93+
path->initial_wnd = QUIC_MIN(10 * max_dgram_sz, QUIC_MAX(max_dgram_sz << 1, 14720U));
94+
path->cwnd = path->initial_wnd;
9495
path->mcwnd = path->cwnd;
9596
path->max_cwnd = max_cwnd;
9697
path->min_cwnd = max_dgram_sz << 1;

0 commit comments

Comments
 (0)