From: Frederic Lecaille Date: Fri, 13 Dec 2024 18:36:51 +0000 (+0100) Subject: CLEANUP: quic: Rename some BBR functions in relation with bw probing X-Git-Tag: v3.2-dev2~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=949bc18f660d860b9102360d2b98d0c96e60266c;p=thirdparty%2Fhaproxy.git CLEANUP: quic: Rename some BBR functions in relation with bw probing Rename bbr_is_probing_bw() to bbr_is_in_a_probe_state() and bbr_is_accelerating_probing_bw() to bbr_is_probing_bw() to match the function names of the BBR v3 internet draft. Must be backported to 3.1 to ease any further backport to come. --- diff --git a/src/quic_cc_bbr.c b/src/quic_cc_bbr.c index 86763ef36f..988779256d 100644 --- a/src/quic_cc_bbr.c +++ b/src/quic_cc_bbr.c @@ -277,7 +277,7 @@ static inline int is_inflight_too_high(struct quic_cc_rs *rs) rs->tx_in_flight * BBR_LOSS_THRESH_MULT; } -static inline int bbr_is_probing_bw(struct bbr *bbr) +static inline int bbr_is_in_a_probe_bw_state(struct bbr *bbr) { switch (bbr->state) { case BBR_ST_PROBE_BW_DOWN: @@ -527,7 +527,7 @@ static void bbr_bound_cwnd_for_model(struct bbr *bbr, struct quic_cc_path *p) { uint64_t cap = UINT64_MAX; - if (bbr_is_probing_bw(bbr) && bbr->state != BBR_ST_PROBE_BW_CRUISE) + if (bbr_is_in_a_probe_bw_state(bbr) && bbr->state != BBR_ST_PROBE_BW_CRUISE) cap = bbr->inflight_hi; else if (bbr->state == BBR_ST_PROBE_RTT || bbr->state == BBR_ST_PROBE_BW_CRUISE) cap = bbr_inflight_with_headroom(bbr, p); @@ -1026,7 +1026,7 @@ static void bbr_loss_lower_bounds(struct bbr *bbr) bbr->inflight_lo * BBR_BETA_MULT / BBR_BETA_DIVI); } -static inline int bbr_is_accelerating_probing_bw(struct bbr *bbr) +static inline int bbr_is_probing_bw(struct bbr *bbr) { return bbr->state == BBR_ST_STARTUP || bbr->state == BBR_ST_PROBE_BW_REFILL || @@ -1035,7 +1035,7 @@ static inline int bbr_is_accelerating_probing_bw(struct bbr *bbr) static void bbr_adapt_lower_bounds_from_congestion(struct bbr *bbr, struct quic_cc_path *p) { - if (bbr_is_accelerating_probing_bw(bbr)) + if (bbr_is_probing_bw(bbr)) return; if (bbr->loss_in_round) { @@ -1134,7 +1134,7 @@ static void bbr_update_probe_bw_cycle_phase(struct bbr *bbr, struct quic_cc_path return; /* only handling steady-state behavior here */ bbr_adapt_upper_bounds(bbr, p, acked); - if (!bbr_is_probing_bw(bbr)) + if (!bbr_is_in_a_probe_bw_state(bbr)) return; /* only handling ProbeBW states here: */ switch (bbr->state) { @@ -1413,7 +1413,7 @@ static void bbr_handle_restart_from_idle(struct bbr *bbr, struct quic_cc_path *p bbr->idle_restart = 1; bbr->extra_acked_interval_start = now_ms; - if (bbr_is_probing_bw(bbr)) + if (bbr_is_in_a_probe_bw_state(bbr)) bbr_set_pacing_rate_with_gain(bbr, p, 100); else if (bbr->state == BBR_ST_PROBE_RTT) bbr_check_probe_rtt_done(bbr, p);