]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: remove unused pacing burst in bind_conf/quic_cc_path
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 23 Jan 2025 16:06:04 +0000 (17:06 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 23 Jan 2025 16:40:48 +0000 (17:40 +0100)
Pacing burst size is now dynamic. As such, configuration value has been
removed and related fields in bind_conf and quic_cc_path structures can
be safely removed.

This should be backported up to 3.1.

include/haproxy/listener-t.h
include/haproxy/quic_cc-t.h
include/haproxy/quic_cc.h
src/cfgparse-quic.c
src/listener.c
src/quic_cc.c
src/quic_conn.c

index ceb19b3821fa4bc6925ec4c5eb65e6d95986e3af..becc83b01d5df6a9891b78a62005c4f272d94a0e 100644 (file)
@@ -185,7 +185,6 @@ struct bind_conf {
        struct quic_cc_algo *quic_cc_algo; /* QUIC control congestion algorithm */
        size_t max_cwnd;                   /* QUIC maximumu congestion control window size (kB) */
        enum quic_sock_mode quic_mode;     /* QUIC socket allocation strategy */
-       int quic_pacing_burst;             /* QUIC allowed pacing burst size */
 #endif
        struct proxy *frontend;    /* the frontend all these listeners belong to, or NULL */
        const struct mux_proto_list *mux_proto; /* the mux to use for all incoming connections (specified by the "proto" keyword) */
index d6531501d6ec1d3c97ee3aab17b15a87c670bf92..59be6a3e731f05032e6fbf22f524cf0b9849f693 100644 (file)
@@ -118,8 +118,6 @@ struct quic_cc_path {
        uint64_t in_flight;
        /* Number of in flight ack-eliciting packets. */
        uint64_t ifae_pkts;
-       /* Burst size if pacing is used. Not used if congestion algo handle pacing itself. */
-       uint32_t pacing_burst;
        uint64_t delivery_rate; /* bytes per second */
        size_t send_quantum;
        uint32_t recovery_start_ts;
index b16996d0c60a4146d7bbfae700952fea7f6982d6..281f1977e353401e6db0a20c2cf60a8411d50ea2 100644 (file)
@@ -39,7 +39,6 @@ void quic_cc_state_trace(struct buffer *buf, const struct quic_cc *cc);
 
 /* Pacing callbacks */
 uint quic_cc_default_pacing_inter(const struct quic_cc *cc);
-uint quic_cc_default_pacing_burst(const struct quic_cc *cc);
 
 static inline const char *quic_cc_state_str(enum quic_cc_algo_state_type state)
 {
@@ -82,7 +81,7 @@ static inline void *quic_cc_priv(const struct quic_cc *cc)
  * which is true for an IPv4 path, if not false for an IPv6 path.
  */
 static inline void quic_cc_path_init(struct quic_cc_path *path, int ipv4, unsigned long max_cwnd,
-                                     struct quic_cc_algo *algo, int burst,
+                                     struct quic_cc_algo *algo,
                                      struct quic_conn *qc)
 {
        unsigned int max_dgram_sz;
@@ -98,7 +97,6 @@ static inline void quic_cc_path_init(struct quic_cc_path *path, int ipv4, unsign
        path->prep_in_flight = 0;
        path->in_flight = 0;
        path->ifae_pkts = 0;
-       path->pacing_burst = burst;
        quic_cc_init(&path->cc, algo, qc);
        path->delivery_rate = 0;
        path->send_quantum = 64 * 1024;
index cbc1ae82af05a2774b58b2a9741de07bcbaa7b72..ad48e8a6d2d55bc952aaa3aadd6c404413454608 100644 (file)
@@ -202,9 +202,7 @@ static int bind_parse_quic_cc_algo(char **args, int cur_arg, struct proxy *px,
                                        goto fail;
                                }
 
-                               conf->quic_pacing_burst = burst;
                                cc_algo->pacing_inter = quic_cc_default_pacing_inter;
-                               cc_algo->pacing_burst = quic_cc_default_pacing_burst;
                        }
 
                        if (*end_opt == ')') {
index 5e423eb5735bf4d86edf8da910165d2347b5e143..95a5fef7036c44a44f94f936b0ed13718fe9b94e 100644 (file)
@@ -2040,7 +2040,6 @@ struct bind_conf *bind_conf_alloc(struct proxy *fe, const char *file,
        /* Use connection socket for QUIC by default. */
        bind_conf->quic_mode = QUIC_SOCK_MODE_CONN;
        bind_conf->max_cwnd = global.tune.quic_frontend_max_window_size;
-       bind_conf->quic_pacing_burst = 0;
 #endif
        LIST_INIT(&bind_conf->listeners);
 
index 2365960c18f9176632b2937b8592e82bcd6c8ef5..d96aa3859f772ad4296b81dde919531bb28cdedf 100644 (file)
@@ -57,15 +57,6 @@ uint quic_cc_default_pacing_inter(const struct quic_cc *cc)
        return path->loss.srtt * 1000000 / (path->cwnd / path->mtu + 1) + 1;
 }
 
-/* Return the max number of datagrams which can be emitted in a burst with
- * pacing. Must return a strictly positive value.
- */
-uint quic_cc_default_pacing_burst(const struct quic_cc *cc)
-{
-       struct quic_cc_path *path = container_of(cc, struct quic_cc_path, cc);
-       return path->pacing_burst;
-}
-
 /* Returns true if congestion window on path ought to be increased. */
 int quic_cwnd_may_increase(const struct quic_cc_path *path)
 {
index 8f1b4849176fd9246f5f786b6239dda09a0c02f7..d135afc60dfe33762b564b1c1b27155672f99559 100644 (file)
@@ -1225,8 +1225,7 @@ struct quic_conn *qc_new_conn(const struct quic_version *qv, int ipv4,
        /* Only one path at this time (multipath not supported) */
        qc->path = &qc->paths[0];
        quic_cc_path_init(qc->path, ipv4, server ? l->bind_conf->max_cwnd : 0,
-                         cc_algo ? cc_algo : default_quic_cc_algo,
-                         l->bind_conf->quic_pacing_burst, qc);
+                         cc_algo ? cc_algo : default_quic_cc_algo, qc);
 
        memcpy(&qc->local_addr, local_addr, sizeof(qc->local_addr));
        memcpy(&qc->peer_addr, peer_addr, sizeof qc->peer_addr);