]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: Remove useless BUG_ON() in newreno and cubic algo implementation
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 3 Apr 2023 11:01:58 +0000 (13:01 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Mon, 3 Apr 2023 11:15:56 +0000 (13:15 +0200)
As now_ms may be zero, these BUG_ON() could be triggered when its value has wrapped.
These call to BUG_ON() may be removed because the values they was supposed to
check are safely used by the ticks API.

Must be backported to 2.6 and 2.7.

src/quic_cc_cubic.c
src/quic_cc_newreno.c

index 4d31cc725333b23172681ef0153fa7de5bae0535..1a5fa4e5b1b984d0a0796b4a99906f18440c5ce8 100644 (file)
@@ -263,8 +263,6 @@ static void quic_cc_cubic_rp_cb(struct quic_cc *cc, struct quic_cc_event *ev)
        TRACE_ENTER(QUIC_EV_CONN_CC, cc->qc, ev);
        TRACE_PROTO("CC cubic", QUIC_EV_CONN_CC, cc->qc, ev, cc);
 
-       BUG_ON(!tick_isset(c->recovery_start_time));
-
        switch (ev->type) {
        case QUIC_CC_EVT_ACK:
                /* RFC 9022 7.3.2. Recovery
index f1566ba8a9cb2cf87aeb901ac3b05301645363c4..4d9bf136a4e696d42263ca51c8e151d08d7ef3e6 100644 (file)
@@ -146,8 +146,6 @@ static void quic_cc_nr_rp_cb(struct quic_cc *cc, struct quic_cc_event *ev)
        struct quic_path *path;
        struct nr *nr = quic_cc_priv(cc);
 
-       BUG_ON(!tick_isset(nr->recovery_start_time));
-
        TRACE_ENTER(QUIC_EV_CONN_CC, cc->qc);
        TRACE_PROTO("CC reno", QUIC_EV_CONN_CC, cc->qc, ev);
        path = container_of(cc, struct quic_path, cc);