]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Add the congestion window initial value to QUIC path
authorFrederic Lecaille <flecaille@haproxy.com>
Tue, 13 Aug 2024 13:23:24 +0000 (15:23 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Wed, 20 Nov 2024 16:34:22 +0000 (17:34 +0100)
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.

include/haproxy/quic_cc-t.h
include/haproxy/quic_cc.h

index 5293495fd4a7994053f90e400e692a939c16379b..e5ed9b3c3f03d2371a83460bf4e77a707353d951 100644 (file)
@@ -99,6 +99,8 @@ struct quic_cc_path {
 
        /* MTU. Must be constant for GSO support. */
        const size_t mtu;
+       /* Initial congestion window. */
+       uint64_t initial_wnd;
        /* Congestion window. */
        uint64_t cwnd;
        /* The current maximum congestion window value reached. */
index 8003878fdb3f778911a9f3c5d0baf23f8196d73f..bb15b3f91548e3b6f8efbd1f579e7bfa2e6213c5 100644 (file)
@@ -90,7 +90,8 @@ static inline void quic_cc_path_init(struct quic_cc_path *path, int ipv4, unsign
        max_dgram_sz = ipv4 ? QUIC_INITIAL_IPV4_MTU : QUIC_INITIAL_IPV6_MTU;
        quic_loss_init(&path->loss);
        *(size_t *)&path->mtu = max_dgram_sz;
-       path->cwnd = QUIC_MIN(10 * max_dgram_sz, QUIC_MAX(max_dgram_sz << 1, 14720U));
+       path->initial_wnd = QUIC_MIN(10 * max_dgram_sz, QUIC_MAX(max_dgram_sz << 1, 14720U));
+       path->cwnd = path->initial_wnd;
        path->mcwnd = path->cwnd;
        path->max_cwnd = max_cwnd;
        path->min_cwnd = max_dgram_sz << 1;