From: Frédéric Lécaille Date: Mon, 3 Apr 2023 11:01:58 +0000 (+0200) Subject: BUG/MINOR: quic: Remove useless BUG_ON() in newreno and cubic algo implementation X-Git-Tag: v2.8-dev7~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c877bd4ea5dba14738bbf565df13d3016eb52bb3;p=thirdparty%2Fhaproxy.git BUG/MINOR: quic: Remove useless BUG_ON() in newreno and cubic algo implementation 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. --- diff --git a/src/quic_cc_cubic.c b/src/quic_cc_cubic.c index 4d31cc7253..1a5fa4e5b1 100644 --- a/src/quic_cc_cubic.c +++ b/src/quic_cc_cubic.c @@ -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 diff --git a/src/quic_cc_newreno.c b/src/quic_cc_newreno.c index f1566ba8a9..4d9bf136a4 100644 --- a/src/quic_cc_newreno.c +++ b/src/quic_cc_newreno.c @@ -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);