diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 0d2e358369..77272264ec 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -265,34 +265,38 @@ all subsequent ACK frames containing them could be lost. In this case, the loss recovery algorithm may cause spurious retransmits, but the sender will continue making forward progress. - -# Loss Detection - -QUIC senders use both ack information and timeouts to detect lost packets, and -this section provides a description of these algorithms. Estimating the network -round-trip time (RTT) is critical to these algorithms and is described first. - -If a packet is lost, the QUIC transport needs to recover from that loss, such -as by retransmitting the data, sending an updated frame, or abandoning the -frame. For more information, see Section 13.2 of {{QUIC-TRANSPORT}}. - -## Computing the RTT estimate +# Computing the RTT estimate RTT is calculated when an ACK frame arrives by computing the difference between the current time and the time the largest acked packet was sent. An RTT sample MUST NOT be taken for a packet that is not newly acknowledged or not -ack-eliciting. When RTT is calculated, the ack delay field from the ACK frame -SHOULD be subtracted from the RTT as long as the result is larger than the -Min RTT. If the result is smaller than the min_rtt, the RTT should be used, but -the ack delay field should be ignored. +ack-eliciting. + +When RTT is calculated, the ack delay field from the ACK frame SHOULD be limited +to the max_ack_delay specified by the peer. Limiting ack_delay to max_ack_delay +ensures a peer specifying an extremely small max_ack_delay doesn't cause more +spurious timeouts than a peer that correctly specifies max_ack_delay. It SHOULD +be subtracted from the RTT as long as the result is larger than the min_rtt. +If the result is smaller than the min_rtt, the RTT should be used, but the +ack delay field should be ignored. Like TCP, QUIC calculates both smoothed RTT and RTT variance similar to those specified in {{?RFC6298}}. -Min RTT is the minimum RTT measured over the connection, prior to adjusting by +min_rtt is the minimum RTT measured over the connection, prior to adjusting by ack delay. Ignoring ack delay for min RTT prevents intentional or unintentional underestimation of min RTT, which in turn prevents underestimating smoothed RTT. +# Loss Detection + +QUIC senders use both ack information and timeouts to detect lost packets, and +this section provides a description of these algorithms. Estimating the network +round-trip time (RTT) is critical to these algorithms and is described first. + +If a packet is lost, the QUIC transport needs to recover from that loss, such +as by retransmitting the data, sending an updated frame, or abandoning the +frame. For more information, see Section 13.2 of {{QUIC-TRANSPORT}}. + ## Ack-based Detection Ack-based loss detection implements the spirit of TCP's Fast Retransmit @@ -738,6 +742,8 @@ Pseudocode for OnAckReceived and UpdateRtt follow: UpdateRtt(latest_rtt, ack_delay): // min_rtt ignores ack delay. min_rtt = min(min_rtt, latest_rtt) + // Limit ack_delay by max_ack_delay + ack_delay = min(ack_delay, max_ack_delay) // Adjust for ack delay if it's plausible. if (latest_rtt - min_rtt > ack_delay): latest_rtt -= ack_delay