From: Amaury Denoyelle Date: Thu, 1 Aug 2024 09:25:15 +0000 (+0200) Subject: BUG/MINOR: quic: fix fc_rtt/srtt values X-Git-Tag: v3.1-dev5~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=522c3bea2c80e3aa06d727fc62fb317b10a3ab8b;p=thirdparty%2Fhaproxy.git BUG/MINOR: quic: fix fc_rtt/srtt values QUIC has recently implement get_info callback to return RTT/sRTT values. However, it uses milliseconds, contrary to TCP which uses microseconds. This cause smp fetch functions to return invalid values. Fix this by converting QUIC values to microseconds. This does not need to be backported. --- diff --git a/src/proto_quic.c b/src/proto_quic.c index d16cbbb8a7..f9f4930399 100644 --- a/src/proto_quic.c +++ b/src/proto_quic.c @@ -702,8 +702,8 @@ static int quic_get_info(struct connection *conn, long long int *info, int info_ struct quic_conn *qc = conn->handle.qc; switch (info_num) { - case 0: *info = qc->path->loss.srtt; break; - case 1: *info = qc->path->loss.rtt_var; break; + case 0: *info = qc->path->loss.srtt * 1000; break; + case 1: *info = qc->path->loss.rtt_var * 1000; break; case 3: *info = qc->path->loss.nb_lost_pkt; break; case 7: *info = qc->path->loss.nb_reordered_pkt; break; default: return 0;