| draft-ietf-quic-recovery-00.txt | draft-ietf-quic-recovery-01.txt | |||
|---|---|---|---|---|
| QUIC J. Iyengar, Ed. | QUIC J. Iyengar, Ed. | |||
| Internet-Draft I. Swett, Ed. | Internet-Draft I. Swett, Ed. | |||
| Intended status: Standards Track Google | Intended status: Standards Track Google | |||
| Expires: June 1, 2017 November 28, 2016 | Expires: July 18, 2017 January 14, 2017 | |||
| QUIC Loss Detection and Congestion Control | QUIC Loss Detection and Congestion Control | |||
| draft-ietf-quic-recovery-00 | draft-ietf-quic-recovery-01 | |||
| Abstract | Abstract | |||
| QUIC is a new multiplexed and secure transport atop UDP. QUIC builds | QUIC is a new multiplexed and secure transport atop UDP. QUIC builds | |||
| on decades of transport and security experience, and implements | on decades of transport and security experience, and implements | |||
| mechanisms that make it attractive as a modern general-purpose | mechanisms that make it attractive as a modern general-purpose | |||
| transport. QUIC implements the spirit of known TCP loss detection | transport. QUIC implements the spirit of known TCP loss detection | |||
| mechanisms, described in RFCs, various Internet-drafts, and also | mechanisms, described in RFCs, various Internet-drafts, and also | |||
| those prevalent in the Linux TCP implementation. This document | those prevalent in the Linux TCP implementation. This document | |||
| describes QUIC loss detection and congestion control, and attributes | describes QUIC loss detection and congestion control, and attributes | |||
| the TCP equivalent in RFCs, Internet-drafts, academic papers, and TCP | the TCP equivalent in RFCs, Internet-drafts, academic papers, and TCP | |||
| implementations. | implementations. | |||
| Note to Readers | ||||
| Discussion of this draft takes place on the QUIC working group | ||||
| mailing list (quic@ietf.org), which is archived at | ||||
| https://mailarchive.ietf.org/arch/search/?email_list=quic . | ||||
| Working Group information can be found at https://github.com/quicwg ; | ||||
| source code and issues list for this draft can be found at | ||||
| https://github.com/quicwg/base-drafts/labels/recovery . | ||||
| Status of This Memo | Status of This Memo | |||
| This Internet-Draft is submitted in full conformance with the | This Internet-Draft is submitted in full conformance with the | |||
| provisions of BCP 78 and BCP 79. | provisions of BCP 78 and BCP 79. | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
| working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
| Drafts is at http://datatracker.ietf.org/drafts/current/. | Drafts is at http://datatracker.ietf.org/drafts/current/. | |||
| Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| This Internet-Draft will expire on June 1, 2017. | This Internet-Draft will expire on July 18, 2017. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2016 IETF Trust and the persons identified as the | Copyright (c) 2017 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
| (http://trustee.ietf.org/license-info) in effect on the date of | (http://trustee.ietf.org/license-info) in effect on the date of | |||
| publication of this document. Please review these documents | publication of this document. Please review these documents | |||
| carefully, as they describe your rights and restrictions with respect | carefully, as they describe your rights and restrictions with respect | |||
| to this document. Code Components extracted from this document must | to this document. Code Components extracted from this document must | |||
| include Simplified BSD License text as described in Section 4.e of | include Simplified BSD License text as described in Section 4.e of | |||
| the Trust Legal Provisions and are provided without warranty as | the Trust Legal Provisions and are provided without warranty as | |||
| described in the Simplified BSD License. | described in the Simplified BSD License. | |||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
| 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 | 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 | |||
| 2. Design of the QUIC Transmission Machinery . . . . . . . . . . 3 | 2. Design of the QUIC Transmission Machinery . . . . . . . . . . 3 | |||
| 2.1. Relevant Differences Between QUIC and TCP . . . . . . . . 4 | 2.1. Relevant Differences Between QUIC and TCP . . . . . . . . 4 | |||
| 2.1.1. Monotonically Increasing Packet Numbers . . . . . . . 4 | 2.1.1. Monotonically Increasing Packet Numbers . . . . . . . 4 | |||
| 2.1.2. No Reneging . . . . . . . . . . . . . . . . . . . . . 4 | 2.1.2. No Reneging . . . . . . . . . . . . . . . . . . . . . 5 | |||
| 2.1.3. More ACK Ranges . . . . . . . . . . . . . . . . . . . 4 | 2.1.3. More ACK Ranges . . . . . . . . . . . . . . . . . . . 5 | |||
| 2.1.4. Explicit Correction For Delayed Acks . . . . . . . . 5 | 2.1.4. Explicit Correction For Delayed Acks . . . . . . . . 5 | |||
| 3. Loss Detection . . . . . . . . . . . . . . . . . . . . . . . 5 | 3. Loss Detection . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
| 3.1. Variables of interest . . . . . . . . . . . . . . . . . . 5 | 3.1. Constants of interest . . . . . . . . . . . . . . . . . . 5 | |||
| 3.2. Initialization . . . . . . . . . . . . . . . . . . . . . 6 | 3.2. Variables of interest . . . . . . . . . . . . . . . . . . 6 | |||
| 3.3. Setting the Loss Detection Alarm . . . . . . . . . . . . 6 | 3.3. Initialization . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 3.4. On Sending a Packet . . . . . . . . . . . . . . . . . . . 7 | 3.4. Setting the Loss Detection Alarm . . . . . . . . . . . . 7 | |||
| 3.5. On Packet Acknowledgment . . . . . . . . . . . . . . . . 7 | 3.5. On Sending a Packet . . . . . . . . . . . . . . . . . . . 8 | |||
| 3.6. On Alarm Firing . . . . . . . . . . . . . . . . . . . . . 7 | 3.6. On Ack Receipt . . . . . . . . . . . . . . . . . . . . . 8 | |||
| 3.7. Detecting Lost Packets . . . . . . . . . . . . . . . . . 8 | 3.7. On Packet Acknowledgment . . . . . . . . . . . . . . . . 9 | |||
| 4. Congestion Control . . . . . . . . . . . . . . . . . . . . . 8 | 3.8. On Alarm Firing . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 5. TCP mechanisms in QUIC . . . . . . . . . . . . . . . . . . . 8 | 3.9. Detecting Lost Packets . . . . . . . . . . . . . . . . . 10 | |||
| 5.1. RFC 6298 (RTO computation) . . . . . . . . . . . . . . . 8 | 4. Congestion Control . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 5.2. FACK Loss Recovery (paper) . . . . . . . . . . . . . . . 9 | 5. TCP mechanisms in QUIC . . . . . . . . . . . . . . . . . . . 10 | |||
| 5.3. RFC 3782, RFC 6582 (NewReno Fast Recovery) . . . . . . . 9 | 5.1. RFC 6298 (RTO computation) . . . . . . . . . . . . . . . 11 | |||
| 5.4. TLP (draft) . . . . . . . . . . . . . . . . . . . . . . . 9 | 5.2. FACK Loss Recovery (paper) . . . . . . . . . . . . . . . 11 | |||
| 5.5. RFC 5827 (Early Retransmit) with Delay Timer . . . . . . 9 | 5.3. RFC 3782, RFC 6582 (NewReno Fast Recovery) . . . . . . . 11 | |||
| 5.6. RFC 5827 (F-RTO) . . . . . . . . . . . . . . . . . . . . 9 | 5.4. TLP (draft) . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
| 5.7. RFC 6937 (Proportional Rate Reduction) . . . . . . . . . 10 | 5.5. RFC 5827 (Early Retransmit) with Delay Timer . . . . . . 11 | |||
| 5.8. TCP Cubic (draft) with optional RFC 5681 (Reno) . . . . . 10 | 5.6. RFC 5827 (F-RTO) . . . . . . . . . . . . . . . . . . . . 12 | |||
| 5.9. Hybrid Slow Start (paper) . . . . . . . . . . . . . . . . 10 | 5.7. RFC 6937 (Proportional Rate Reduction) . . . . . . . . . 12 | |||
| 5.10. RACK (draft) . . . . . . . . . . . . . . . . . . . . . . 10 | 5.8. TCP Cubic (draft) with optional RFC 5681 (Reno) . . . . . 12 | |||
| 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 | 5.9. Hybrid Slow Start (paper) . . . . . . . . . . . . . . . . 12 | |||
| 7. Normative References . . . . . . . . . . . . . . . . . . . . 10 | 5.10. RACK (draft) . . . . . . . . . . . . . . . . . . . . . . 12 | |||
| Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 11 | 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 | 7. Normative References . . . . . . . . . . . . . . . . . . . . 12 | |||
| Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 13 | ||||
| Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 13 | ||||
| B.1. Since draft-ietf-quic-recovery-00: . . . . . . . . . . . 13 | ||||
| B.2. Since draft-iyengar-quic-loss-recovery-01: . . . . . . . 13 | ||||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 13 | ||||
| 1. Introduction | 1. Introduction | |||
| QUIC is a new multiplexed and secure transport atop UDP. QUIC builds | QUIC is a new multiplexed and secure transport atop UDP. QUIC builds | |||
| on decades of transport and security experience, and implements | on decades of transport and security experience, and implements | |||
| mechanisms that make it attractive as a modern general-purpose | mechanisms that make it attractive as a modern general-purpose | |||
| transport. The QUIC protocol is described in [QUIC-TRANSPORT]. | transport. The QUIC protocol is described in [QUIC-TRANSPORT]. | |||
| QUIC implements the spirit of known TCP loss recovery mechanisms, | QUIC implements the spirit of known TCP loss recovery mechanisms, | |||
| described in RFCs, various Internet-drafts, and also those prevalent | described in RFCs, various Internet-drafts, and also those prevalent | |||
| skipping to change at page 5, line 22 ¶ | skipping to change at page 5, line 34 ¶ | |||
| delay from when a packet was received by the OS kernel, which is | delay from when a packet was received by the OS kernel, which is | |||
| useful in receivers which may incur delays such as context-switch | useful in receivers which may incur delays such as context-switch | |||
| latency before a userspace QUIC receiver processes a received packet. | latency before a userspace QUIC receiver processes a received packet. | |||
| 3. Loss Detection | 3. Loss Detection | |||
| We now describe QUIC's loss detection as functions that should be | We now describe QUIC's loss detection as functions that should be | |||
| called on packet transmission, when a packet is acked, and timer | called on packet transmission, when a packet is acked, and timer | |||
| expiration events. | expiration events. | |||
| 3.1. Variables of interest | 3.1. Constants of interest | |||
| Constants used in loss recovery and congestion control are based on a | ||||
| combination of RFCs, papers, and common practice. Some may need to | ||||
| be changed or negotiated in order to better suit a variety of | ||||
| environments. | ||||
| o kMaxTLPs: 2 Maximum number of tail loss probes before an RTO | ||||
| fires. | ||||
| o kReorderingThreshold: 3 Maximum reordering in packet number space | ||||
| before FACK style loss detection considers a packet lost. | ||||
| o kTimeReorderingThreshold: 1/8 Maximum reordering in time sapce | ||||
| before time based loss detection considers a packet lost. In | ||||
| fraction of an RTT. | ||||
| o kMinTLPTimeout: 10ms Minimum time in the future a tail loss probe | ||||
| alarm may be set for. | ||||
| o kMinRTOTimeout: 200ms Minimum time in the future an RTO alarm may | ||||
| be set for. | ||||
| o kDelayedAckTimeout: 25ms The length of the peer's delayed ack | ||||
| timer. | ||||
| 3.2. Variables of interest | ||||
| We first describe the variables required to implement the loss | We first describe the variables required to implement the loss | |||
| detection mechanisms described in this section. | detection mechanisms described in this section. | |||
| o loss_detection_alarm: Multi-modal alarm used for loss detection. | o loss_detection_alarm: Multi-modal alarm used for loss detection. | |||
| o alarm_mode: QUIC maintains a single loss detection alarm, which | o alarm_mode: QUIC maintains a single loss detection alarm, which | |||
| switches between various modes. This mode is used to determine | switches between various modes. This mode is used to determine | |||
| the duration of the alarm. | the duration of the alarm. | |||
| o handshake_count: The number of times the handshake packets have | o handshake_count: The number of times the handshake packets have | |||
| been retransmitted without receiving an ack. | been retransmitted without receiving an ack. | |||
| o tlp_count: The number of times a tail loss probe has been sent | o tlp_count: The number of times a tail loss probe has been sent | |||
| without receiving an ack. | without receiving an ack. | |||
| o rto_count: The number of times an rto has been sent without | o rto_count: The number of times an rto has been sent without | |||
| receiving an ack. | receiving an ack. | |||
| o smoothed_rtt: The smoothed RTT of the connection, computed as | o smoothed_rtt: The smoothed RTT of the connection, computed as | |||
| described in [RFC6298]. TODO: Describe RTT computations. | described in [RFC6298] | |||
| o rttvar: The RTT variance. | ||||
| o reordering_threshold: The largest delta between the largest acked | o reordering_threshold: The largest delta between the largest acked | |||
| retransmittable packet and a packet containing retransmittable | retransmittable packet and a packet containing retransmittable | |||
| frames before it's declared lost. | frames before it's declared lost. | |||
| o time_loss: When true, loss detection operates solely based on | o use_time_loss: When true, loss detection operates solely based on | |||
| reordering threshold in time, rather than in packet number gaps. | reordering threshold in time, rather than in packet number gaps. | |||
| 3.2. Initialization | o sent_packets: An association of packet numbers to information | |||
| about them. | ||||
| 3.3. Initialization | ||||
| At the beginning of the connection, initialize the loss detection | At the beginning of the connection, initialize the loss detection | |||
| variables as follows: | variables as follows: | |||
| loss_detection_alarm.reset(); | loss_detection_alarm.reset(); | |||
| handshake_count = 0; | handshake_count = 0; | |||
| tlp_count = 0; | tlp_count = 0; | |||
| rto_count = 0; | rto_count = 0; | |||
| reordering_threshold = kReorderingThreshold; | ||||
| use_time_loss = false; | ||||
| smoothed_rtt = 0; | smoothed_rtt = 0; | |||
| reordering_threshold = 3; | rttvar = 0; | |||
| time_loss = false; | ||||
| 3.3. Setting the Loss Detection Alarm | 3.4. Setting the Loss Detection Alarm | |||
| QUIC loss detection uses a single alarm for all timer-based loss | QUIC loss detection uses a single alarm for all timer-based loss | |||
| detection. The duration of the alarm is based on the alarm's mode, | detection. The duration of the alarm is based on the alarm's mode, | |||
| which is set in the packet and timer events further below. The | which is set in the packet and timer events further below. The | |||
| function SetLossDetectionAlarm defined below shows how the single | function SetLossDetectionAlarm defined below shows how the single | |||
| timer is set based on the alarm mode. | timer is set based on the alarm mode. | |||
| Pseudocode for SetLossDetectionAlarm follows: | Pseudocode for SetLossDetectionAlarm follows: | |||
| SetLossDetectionAlarm(): | SetLossDetectionAlarm(): | |||
| skipping to change at page 6, line 32 ¶ | skipping to change at page 7, line 28 ¶ | |||
| which is set in the packet and timer events further below. The | which is set in the packet and timer events further below. The | |||
| function SetLossDetectionAlarm defined below shows how the single | function SetLossDetectionAlarm defined below shows how the single | |||
| timer is set based on the alarm mode. | timer is set based on the alarm mode. | |||
| Pseudocode for SetLossDetectionAlarm follows: | Pseudocode for SetLossDetectionAlarm follows: | |||
| SetLossDetectionAlarm(): | SetLossDetectionAlarm(): | |||
| if (retransmittable packets are not outstanding): | if (retransmittable packets are not outstanding): | |||
| loss_detection_alarm.cancel(); | loss_detection_alarm.cancel(); | |||
| return; | return; | |||
| if (handshake packets are outstanding): | if (handshake packets are outstanding): | |||
| alarm_duration = max(1.5 * smoothed_rtt, 10ms) << handshake_count; | // Handshake retransmission alarm. | |||
| alarm_duration = max(1.5 * smoothed_rtt, kMinTLPTimeout) << handshake_count; | ||||
| handshake_count++; | handshake_count++; | |||
| else if (largest sent packet is acked): | else if (largest sent packet is acked): | |||
| // Set alarm based on short timer for early retransmit. | // Early retransmit alarm. | |||
| alarm_duration = 0.25 x smoothed_rtt; | alarm_duration = 0.25 x smoothed_rtt; | |||
| else if (tlp_count < 2): | else if (tlp_count < kMaxTLPs): | |||
| // Tail Loss Probe alarm. | ||||
| if (retransmittable_packets_outstanding = 1): | if (retransmittable_packets_outstanding = 1): | |||
| alarm_duration = max(1.5 x smoothed_rtt + delayed_ack_timer, | alarm_duration = max(1.5 x smoothed_rtt + kDelayedAckTimeout, | |||
| 2 x smoothed_rtt); | 2 x smoothed_rtt); | |||
| else: | else: | |||
| alarm_duration = max (10ms, 2 x smoothed_rtt); | alarm_duration = max (kMinTLPTimeout, 2 x smoothed_rtt); | |||
| tlp_count++; | tlp_count++; | |||
| else: | else: | |||
| // RTO alarm. | ||||
| if (rto_count = 0): | if (rto_count = 0): | |||
| alarm_duration = max(200ms, smoothed_rtt + 4 x rttvar); | alarm_duration = max(kMinRTOTimeout, smoothed_rtt + 4 x rttvar); | |||
| else: | else: | |||
| alarm_duration = loss_detection_alarm.get_delay() << 1; | alarm_duration = loss_detection_alarm.get_delay() << 1; | |||
| rto_count++; | rto_count++; | |||
| loss_detection_alarm.set(now + alarm_duration); | loss_detection_alarm.set(now + alarm_duration); | |||
| 3.4. On Sending a Packet | 3.5. On Sending a Packet | |||
| After any packet is sent, be it a new transmission or a rebundled | After any packet is sent, be it a new transmission or a rebundled | |||
| transmission, the following OnPacketSent function is called. The | transmission, the following OnPacketSent function is called. The | |||
| parameters to OnPacketSent are as follows: | parameters to OnPacketSent are as follows: | |||
| o packet_number: The packet number of the sent packet. | o packet_number: The packet number of the sent packet. | |||
| o is_retransmittble: A boolean that indicates whether the packet | o is_retransmittble: A boolean that indicates whether the packet | |||
| contains at least one frame requiring reliable deliver. The | contains at least one frame requiring reliable deliver. The | |||
| retransmittability of various QUIC frames is described in | retransmittability of various QUIC frames is described in | |||
| [QUIC-TRANSPORT]. If false, it is still acceptable for an ack to | [QUIC-TRANSPORT]. If false, it is still acceptable for an ack to | |||
| be received for this packet. However, a caller MUST NOT set | be received for this packet. However, a caller MUST NOT set | |||
| is_retransmittable to true if an ack is not expected. | is_retransmittable to true if an ack is not expected. | |||
| Pseudocode for OnPacketSent follows: | Pseudocode for OnPacketSent follows: | |||
| OnPacketSent(packet_number, is_retransmittable): | OnPacketSent(packet_number, is_retransmittable): | |||
| if is_retransmittable: | # TODO: Clarify the data in sent_packets. | |||
| SetLossDetectionAlarm() | sent_packets[packet_number] = {now} | |||
| if is_retransmittable: | ||||
| SetLossDetectionAlarm() | ||||
| 3.5. On Packet Acknowledgment | 3.6. On Ack Receipt | |||
| When an ack is received, it may acknowledge 0 or more packets. | ||||
| Pseudocode for OnAckReceived and UpdateRtt follow: | ||||
| OnAckReceived(ack): | ||||
| // If the largest acked is newly acked, update the RTT. | ||||
| if (sent_packets[ack.largest_acked]): | ||||
| rtt_sample = now - sent_packets[ack.largest_acked] | ||||
| if (rtt_sample > ack.ack_delay): | ||||
| rtt_sample -= ack.delay; | ||||
| UpdateRtt(rtt_sample) | ||||
| // Find all newly acked packets. | ||||
| for acked_packet in DetermineNewlyAckedPackets(): | ||||
| OnPacketAcked(acked_packet) | ||||
| DetectLostPackets(ack.largest_acked_packet); | ||||
| SetLossDetectionAlarm(); | ||||
| UpdateRtt(rtt_sample): | ||||
| if (smoothed_rtt == 0): | ||||
| smoothed_rtt = rtt_sample | ||||
| rttvar = rtt_sample / 2 | ||||
| else: | ||||
| rttvar = 3/4 * rttvar + 1/4 * (smoothed_rtt - rtt_sample) | ||||
| smoothed_rtt = 7/8 * smoothed_rtt + 1/8 * rtt_sample | ||||
| 3.7. On Packet Acknowledgment | ||||
| When a packet is acked for the first time, the following | When a packet is acked for the first time, the following | |||
| OnPacketAcked function is called. Note that a single ACK frame may | OnPacketAcked function is called. Note that a single ACK frame may | |||
| newly acknowledge several packets. OnPacketAcked must be called once | newly acknowledge several packets. OnPacketAcked must be called once | |||
| for each of these newly acked packets. | for each of these newly acked packets. | |||
| OnPacketAcked takes one parameter, acked_packet, which is the packet | OnPacketAcked takes one parameter, acked_packet, which is the packet | |||
| number of the newly acked packet, and returns a list of packet | number of the newly acked packet, and returns a list of packet | |||
| numbers that are detected as lost. | numbers that are detected as lost. | |||
| Pseudocode for OnPacketAcked follows: | Pseudocode for OnPacketAcked follows: | |||
| OnPacketAcked(acked_packet): | OnPacketAcked(acked_packet): | |||
| handshake_count = 0; | handshake_count = 0; | |||
| tlp_count = 0; | tlp_count = 0; | |||
| rto_count = 0; | rto_count = 0; | |||
| UpdateRtt(); // TODO: document RTT estimator. | # TODO: Don't remove packets immediately, since they can be used for | |||
| DetectLostPackets(acked_packet); | # detecting spurous retransmits. | |||
| SetLossDetectionAlarm(); | sent_packets.remove(acked_packet); | |||
| 3.6. On Alarm Firing | 3.8. On Alarm Firing | |||
| QUIC uses one loss recovery alarm, which when set, can be in one of | QUIC uses one loss recovery alarm, which when set, can be in one of | |||
| several modes. When the alarm fires, the mode determines the action | several modes. When the alarm fires, the mode determines the action | |||
| to be performed. OnAlarm returns a list of packet numbers that are | to be performed. OnAlarm returns a list of packet numbers that are | |||
| detected as lost. | detected as lost. | |||
| Pseudocode for OnAlarm follows: | Pseudocode for OnAlarm follows: | |||
| OnAlarm(acked_packet): | OnAlarm(acked_packet): | |||
| lost_packets = DetectLostPackets(acked_packet); | lost_packets = DetectLostPackets(acked_packet); | |||
| MaybeRetransmitLostPackets(); | MaybeRetransmitLostPackets(); | |||
| SetLossDetectionAlarm(); | SetLossDetectionAlarm(); | |||
| 3.7. Detecting Lost Packets | 3.9. Detecting Lost Packets | |||
| Packets in QUIC are only considered lost once a larger packet number | Packets in QUIC are only considered lost once a larger packet number | |||
| is acknowledged. DetectLostPackets is called every time there is a | is acknowledged. DetectLostPackets is called every time there is a | |||
| new largest packet or if the loss detection alarm fires the previous | new largest packet or if the loss detection alarm fires the previous | |||
| largest acked packet is supplied. | largest acked packet is supplied. | |||
| DetectLostPackets takes one parameter, acked_packet, which is the | DetectLostPackets takes one parameter, acked_packet, which is the | |||
| packet number of the largest acked packet, and returns a list of | packet number of the largest acked packet, and returns a list of | |||
| packet numbers detected as lost. | packet numbers detected as lost. | |||
| Pseudocode for DetectLostPackets follows: | Pseudocode for DetectLostPackets follows: | |||
| DetectLostPackets(acked_packet): | DetectLostPackets(acked_packet): | |||
| lost_packets = {}; | lost_packets = {}; | |||
| foreach (unacked_packet less than acked_packet): | foreach (unacked_packet less than acked_packet): | |||
| if (unacked_packet.time_sent < | if (unacked_packet.time_sent < | |||
| acked_packet.time_sent - 1/8 * smoothed_rtt): | acked_packet.time_sent - kTimeReorderThreshold * smoothed_rtt): | |||
| lost_packets.insert(unacked_packet.packet_number); | lost_packets.insert(unacked_packet.packet_number); | |||
| else if (unacked_packet.packet_number < | else if (unacked_packet.packet_number < | |||
| acked_packet.packet_number - reordering_threshold) | acked_packet.packet_number - reordering_threshold) | |||
| lost_packets.insert(unacked_packet.packet_number); | lost_packets.insert(unacked_packet.packet_number); | |||
| return lost_packets; | return lost_packets; | |||
| 4. Congestion Control | 4. Congestion Control | |||
| (describe NewReno-style congestion control for QUIC.) | (describe NewReno-style congestion control for QUIC.) | |||
| 5. TCP mechanisms in QUIC | 5. TCP mechanisms in QUIC | |||
| QUIC implements the spirit of a variety of RFCs, Internet drafts, and | QUIC implements the spirit of a variety of RFCs, Internet drafts, and | |||
| other well-known TCP loss recovery mechanisms, though the | other well-known TCP loss recovery mechanisms, though the | |||
| implementation details differ from the TCP implementations. | implementation details differ from the TCP implementations. | |||
| skipping to change at page 10, line 40 ¶ | skipping to change at page 12, line 47 ¶ | |||
| of an rtt, as RACK does. | of an rtt, as RACK does. | |||
| 6. IANA Considerations | 6. IANA Considerations | |||
| This document has no IANA actions. Yet. | This document has no IANA actions. Yet. | |||
| 7. Normative References | 7. Normative References | |||
| [QUIC-TLS] | [QUIC-TLS] | |||
| Thomson, M., Ed. and S. Turner, Ed, Ed., "Using Transport | Thomson, M., Ed. and S. Turner, Ed, Ed., "Using Transport | |||
| Layer Security (TLS) to Secure QUIC", November 2016. | Layer Security (TLS) to Secure QUIC". | |||
| [QUIC-TRANSPORT] | [QUIC-TRANSPORT] | |||
| Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based | Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based | |||
| Multiplexed and Secure Transport", November 2016. | Multiplexed and Secure Transport". | |||
| [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
| Requirement Levels", BCP 14, RFC 2119, | Requirement Levels", BCP 14, RFC 2119, | |||
| DOI 10.17487/RFC2119, March 1997, | DOI 10.17487/RFC2119, March 1997, | |||
| <http://www.rfc-editor.org/info/rfc2119>. | <http://www.rfc-editor.org/info/rfc2119>. | |||
| [RFC6298] Paxson, V., Allman, M., Chu, J., and M. Sargent, | [RFC6298] Paxson, V., Allman, M., Chu, J., and M. Sargent, | |||
| "Computing TCP's Retransmission Timer", RFC 6298, | "Computing TCP's Retransmission Timer", RFC 6298, | |||
| DOI 10.17487/RFC6298, June 2011, | DOI 10.17487/RFC6298, June 2011, | |||
| <http://www.rfc-editor.org/info/rfc6298>. | <http://www.rfc-editor.org/info/rfc6298>. | |||
| Appendix A. Acknowledgments | Appendix A. Acknowledgments | |||
| Appendix B. Change Log | ||||
| *RFC Editor's Note:* Please remove this section prior to | ||||
| publication of a final version of this document. | ||||
| B.1. Since draft-ietf-quic-recovery-00: | ||||
| o Improved description of constants and ACK behavior | ||||
| B.2. Since draft-iyengar-quic-loss-recovery-01: | ||||
| o Adopted as base for draft-ietf-quic-recovery. | ||||
| o Updated authors/editors list. | ||||
| o Added table of contents. | ||||
| Authors' Addresses | Authors' Addresses | |||
| Jana Iyengar (editor) | Jana Iyengar (editor) | |||
| Email: jri@google.com | Email: jri@google.com | |||
| Ian Swett (editor) | Ian Swett (editor) | |||
| End of changes. 33 change blocks. | ||||
| 68 lines changed or deleted | 166 lines changed or added | |||
This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||