From daaae83d9c64c951306e3a06f061894c8e92818c Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 7 Mar 2017 16:32:29 -0500 Subject: [PATCH 1/4] Make loss detection make more sense --- draft-ietf-quic-recovery.md | 43 +++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 2c7c80f3da..0d349dfbff 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -267,7 +267,9 @@ use_time_loss: threshold in time, rather than in packet number gaps. sent_packets: -: An association of packet numbers to information about them. +: An association of packet numbers to information about them, including a time + field indicating the time a packet was sent and a bytes field indicating the + packet's size. ## Initialization @@ -306,7 +308,6 @@ Pseudocode for OnPacketSent follows: ~~~ OnPacketSent(packet_number, is_retransmittable, sent_bytes): - # TODO: Clarify the data in sent_packets. sent_packets[packet_number].time = now if is_retransmittable: sent_packets[packet_number].bytes = sent_bytes @@ -398,7 +399,12 @@ Version negotiation packets are always stateless, and MUST be sent once per per handshake packet that uses an unsupported QUIC version, and MAY be sent in response to 0RTT packets. -(Add sections for early retransmit and TLP/RTO here) +### Tail Loss Probe and Retransmission Timeout + +Tail loss probes and retransmission timeouts are an alarm based mechanism +to recover from cases when there are outstanding retransmittable packets, +but an acknowledgement has not been received in a timely manner. + ### Pseudocode @@ -418,7 +424,6 @@ Pseudocode for SetLossDetectionAlarm follows: alarm_duration = 2 * smoothed_rtt alarm_duration = max(alarm_duration, kMinTLPTimeout) alarm_duration = alarm_duration << handshake_count - handshake_count++; else if (largest sent packet is acked): // Early retransmit {{!RFC5827}} // with an alarm to reduce spurious retransmits. @@ -430,7 +435,6 @@ Pseudocode for SetLossDetectionAlarm follows: else: alarm_duration = kMinTLPTimeout alarm_duration = max(alarm_duration, 2 * smoothed_rtt) - tlp_count++ else: // RTO alarm. if (rto_count = 0): @@ -438,7 +442,6 @@ Pseudocode for SetLossDetectionAlarm follows: alarm_duration = max(alarm_duration, kMinRTOTimeout) else: alarm_duration = loss_detection_alarm.get_delay() << 1 - rto_count++ loss_detection_alarm.set(now + alarm_duration) ~~~ @@ -447,14 +450,32 @@ Pseudocode for SetLossDetectionAlarm follows: 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 to be performed. -OnAlarm returns a list of packet numbers that are detected as lost. -Pseudocode for OnAlarm follows: +Pseudocode for OnLossDetectionAlarm follows: ~~~ - OnAlarm(acked_packet): - lost_packets = DetectLostPackets(acked_packet) - MaybeRetransmit(lost_packets) + OnLossDetectionAlarm(): + if (handshake packets are outstanding): + // Handshake retransmission alarm. + RetransmitAllHandshakePackets(); + handshake_count++; + // TODO: Clarify early retransmit and time loss. + else if (): + // Early retransmit or Time Loss Detection + lost_packets = DetectLostPackets(acked_packet) + MaybeRetransmit(lost_packets) + else if (tlp_count < kMaxTLPs): + // Tail Loss Probe alarm. + if (HasNewDataToSend()): + SendOnePacketOfNewData() + else: + RetransmitOldestPacket() + tlp_count++ + else: + // RTO alarm. + RetransmitOldestPacket() + rto_count++ + SetLossDetectionAlarm() ~~~ From f68e9f475d5d221fa1090dbe9e63a737e3f4ba69 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 7 Mar 2017 17:00:12 -0500 Subject: [PATCH 2/4] Minor update. --- draft-ietf-quic-recovery.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 0d349dfbff..797413600e 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -59,10 +59,6 @@ normative: informative: - RFC3782: - RFC6582: - RFC5682: - RFC6937: I-D.dukkipati-tcpm-tcp-loss-probe: --- abstract @@ -401,10 +397,9 @@ in response to 0RTT packets. ### Tail Loss Probe and Retransmission Timeout -Tail loss probes and retransmission timeouts are an alarm based mechanism -to recover from cases when there are outstanding retransmittable packets, -but an acknowledgement has not been received in a timely manner. - +Tail loss probes and retransmission timeouts{{!RFC6298}} are an alarm based +mechanism to recover from cases when there are outstanding retransmittable +packets, but an acknowledgement has not been received in a timely manner. ### Pseudocode @@ -515,11 +510,12 @@ Pseudocode for DetectLostPackets follows: # Congestion Control -(describe NewReno-style congestion control for QUIC.) +(describe NewReno-style congestion control {{!RFC6582}} and {{!RFC3782}} for QUIC.) (describe appropriate byte counting.) (define recovery based on packet numbers.) (describe min_rtt based hystart.) -(describe how QUIC's F-RTO delays reducing CWND until an ack is received.) +(describe how QUIC's F-RTO {{!RFC5682}} delays reducing CWND until an ack is received.) +(describe PRR {{!RFC6937}}) # IANA Considerations From ed1613e136cc974f6cba2d4fc0219b0ef031bf21 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 7 Mar 2017 17:07:47 -0500 Subject: [PATCH 3/4] Fix a long line. --- draft-ietf-quic-recovery.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 797413600e..d1d1056df0 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -514,7 +514,7 @@ Pseudocode for DetectLostPackets follows: (describe appropriate byte counting.) (define recovery based on packet numbers.) (describe min_rtt based hystart.) -(describe how QUIC's F-RTO {{!RFC5682}} delays reducing CWND until an ack is received.) +(describe how QUIC's F-RTO {{!RFC5682}} delays reducing CWND.) (describe PRR {{!RFC6937}}) From 8991da2db50cf31d0700ac709903d6ab48f2f195 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 7 Mar 2017 17:10:52 -0500 Subject: [PATCH 4/4] Fix a long line --- draft-ietf-quic-recovery.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index d1d1056df0..28f02b1fbd 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -510,7 +510,7 @@ Pseudocode for DetectLostPackets follows: # Congestion Control -(describe NewReno-style congestion control {{!RFC6582}} and {{!RFC3782}} for QUIC.) +(describe NewReno-style congestion control {{!RFC6582}} for QUIC.) (describe appropriate byte counting.) (define recovery based on packet numbers.) (describe min_rtt based hystart.)