]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: remove max_bw filter from delivery rate sampling
authorFrederic Lecaille <flecaille@haproxy.com>
Thu, 12 Dec 2024 10:50:26 +0000 (11:50 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Fri, 13 Dec 2024 13:42:43 +0000 (14:42 +0100)
This filter is no more needed after this commit:

 BUG/MINOR: quic: fix BBB max bandwidth oscillation issue.

Indeed, one added this filter at delivery rate sampling level to filter
the BBR max bandwidth estimations and was inspired from ngtcp2 code source when
trying to fix the oscillation issue. But this BBR max bandwidth oscillation issue
was fixed by the aforementioned commit.

Furthermore this code tends to always increment the BBR max bandwidth. From my point
of view, this is not a good idea at all.

Must be backported to 3.1.

include/haproxy/quic_cc_drs.h
src/quic_cc_drs.c

index a910306d5632f8ca20cee114de03d235dfce0b27..89acb6f16f1d4a0a38956cd9a5ca65bc418813d9 100644 (file)
@@ -20,7 +20,6 @@ struct quic_cc_rs {
 /* Delivery rate sampling */
 struct quic_cc_drs {
        struct quic_cc_rs rs;
-       struct wf wf;
        uint64_t round_count;
        uint64_t next_round_delivered;
        uint64_t delivered;
index 8e9d3112f336cb85a3c46a92c113548c9c5e9434..8a0b52c7730872773596facba2a1a3fbcfff7c2d 100644 (file)
@@ -26,7 +26,6 @@ static void quic_cc_rs_init(struct quic_cc_rs *rs)
 void quic_cc_drs_init(struct quic_cc_drs *drs)
 {
        quic_cc_rs_init(&drs->rs);
-       wf_init(&drs->wf, 12, 0, ~0U);
        drs->round_count = 0;
        drs->next_round_delivered = 0;
        drs->delivered = 0;
@@ -122,7 +121,6 @@ void quic_cc_drs_on_ack_recv(struct quic_cc_drs *drs, struct quic_cc_path *path,
                              uint64_t pkt_delivered)
 {
        struct quic_cc_rs *rs = &drs->rs;
-       uint64_t rate;
 
        if (drs->app_limited && drs->delivered > drs->app_limited)
                drs->app_limited = 0;
@@ -150,8 +148,6 @@ void quic_cc_drs_on_ack_recv(struct quic_cc_drs *drs, struct quic_cc_path *path,
        if (!rs->interval_us)
                return;
 
-       /* <rate> is in bytes/s. */
-       rate = rs->delivered * 1000000 / rs->interval_us;
-       if (rate >= wf_get_max(&drs->wf) || !drs->app_limited)
-               path->delivery_rate = wf_max_update(&drs->wf, rate, drs->round_count);
+       /* <delivery_rate> is in bytes/s. */
+       path->delivery_rate = rs->delivered * 1000000 / rs->interval_us;
 }