From: Frédéric Lécaille Date: Thu, 30 Mar 2023 13:31:06 +0000 (+0200) Subject: BUG/MINOR: quic: Wrong rtt variance computing X-Git-Tag: v2.8-dev7~124 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5d5afe790016401952117dbaff8a3324260faf8e;p=thirdparty%2Fhaproxy.git BUG/MINOR: quic: Wrong rtt variance computing In ->srtt quic_loss struct this is 8*srtt which is stored so that not to have to multiply/devide it to compute the RTT variance (at least). This is where there was a bug in quic_loss_srtt_update(): each time ->srtt must be used, it must be devided by 8 or right shifted by 3. This bug had a very bad impact for network with non negligeable packet loss. Must be backported to 2.6 and 2.7. --- diff --git a/src/quic_loss.c b/src/quic_loss.c index 8f19645a70..eff8e6c36c 100644 --- a/src/quic_loss.c +++ b/src/quic_loss.c @@ -37,7 +37,7 @@ void quic_loss_srtt_update(struct quic_loss *ql, /* Specific to QUIC (RTT adjustment). */ if (ack_delay && rtt > ql->rtt_min + ack_delay) rtt -= ack_delay; - diff = ql->srtt - rtt; + diff = (ql->srtt >> 3) - rtt; if (diff < 0) diff = -diff; /* 4*rttvar = 3*rttvar + |diff| */