[PATCH] QUIC: fixed rttvar on subsequent RTT samples (ticket #2505)
Roman Arutyunyan
arut at nginx.com
Tue Jun 13 06:14:29 UTC 2023
Hi,
> On 12 Jun 2023, at 23:39, Sergey Kandaurov <pluknet at nginx.com> wrote:
>
> # HG changeset patch
> # User Sergey Kandaurov <pluknet at nginx.com>
> # Date 1686598736 -14400
> # Mon Jun 12 23:38:56 2023 +0400
> # Node ID a32905d6fc108962a73b4affdb38eba5cc6fd549
> # Parent 262c0178256623c59a54bea81fcf3f92d12d75b6
> QUIC: fixed rttvar on subsequent RTT samples (ticket #2505).
>
> Previously, computing rttvar used an updated smoothed_rtt value as per
> RFC 9002, section 5.3, which appears to be specified in a wrong order.
> A technical errata ID 7539 is reported.
>
> diff --git a/src/event/quic/ngx_event_quic_ack.c b/src/event/quic/ngx_event_quic_ack.c
> --- a/src/event/quic/ngx_event_quic_ack.c
> +++ b/src/event/quic/ngx_event_quic_ack.c
> @@ -207,9 +207,9 @@ ngx_quic_rtt_sample(ngx_connection_t *c,
> adjusted_rtt -= ack_delay;
> }
>
> - qc->avg_rtt += (adjusted_rtt >> 3) - (qc->avg_rtt >> 3);
> rttvar_sample = ngx_abs((ngx_msec_int_t) (qc->avg_rtt - adjusted_rtt));
> qc->rttvar += (rttvar_sample >> 2) - (qc->rttvar >> 2);
> + qc->avg_rtt += (adjusted_rtt >> 3) - (qc->avg_rtt >> 3);
> }
>
> ngx_log_debug4(NGX_LOG_DEBUG_EVENT, c->log, 0,
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> https://mailman.nginx.org/mailman/listinfo/nginx-devel
LGTM
----
Roman Arutyunyan
arut at nginx.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20230613/e5ec3d23/attachment.htm>
More information about the nginx-devel
mailing list