From: Amaury Denoyelle Date: Thu, 23 Jan 2025 16:06:04 +0000 (+0100) Subject: MINOR: quic: remove unused pacing burst in bind_conf/quic_cc_path X-Git-Tag: v3.2-dev4~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7896edccdcdcdde7d7d196205b83e4b3b36f3852;p=thirdparty%2Fhaproxy.git MINOR: quic: remove unused pacing burst in bind_conf/quic_cc_path 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. --- diff --git a/include/haproxy/listener-t.h b/include/haproxy/listener-t.h index ceb19b382..becc83b01 100644 --- a/include/haproxy/listener-t.h +++ b/include/haproxy/listener-t.h @@ -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) */ diff --git a/include/haproxy/quic_cc-t.h b/include/haproxy/quic_cc-t.h index d6531501d..59be6a3e7 100644 --- a/include/haproxy/quic_cc-t.h +++ b/include/haproxy/quic_cc-t.h @@ -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; diff --git a/include/haproxy/quic_cc.h b/include/haproxy/quic_cc.h index b16996d0c..281f1977e 100644 --- a/include/haproxy/quic_cc.h +++ b/include/haproxy/quic_cc.h @@ -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; diff --git a/src/cfgparse-quic.c b/src/cfgparse-quic.c index cbc1ae82a..ad48e8a6d 100644 --- a/src/cfgparse-quic.c +++ b/src/cfgparse-quic.c @@ -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 == ')') { diff --git a/src/listener.c b/src/listener.c index 5e423eb57..95a5fef70 100644 --- a/src/listener.c +++ b/src/listener.c @@ -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); diff --git a/src/quic_cc.c b/src/quic_cc.c index 2365960c1..d96aa3859 100644 --- a/src/quic_cc.c +++ b/src/quic_cc.c @@ -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) { diff --git a/src/quic_conn.c b/src/quic_conn.c index 8f1b48491..d135afc60 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -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);