draft-ietf-quic-recovery-03.txt   draft-ietf-quic-recovery-04.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: November 22, 2017 May 21, 2017 Expires: December 15, 2017 June 13, 2017
QUIC Loss Detection and Congestion Control QUIC Loss Detection and Congestion Control
draft-ietf-quic-recovery-03 draft-ietf-quic-recovery-04
Abstract Abstract
This document describes loss detection and congestion control This document describes loss detection and congestion control
mechanisms for QUIC. mechanisms for QUIC.
Note to Readers Note to Readers
Discussion of this draft takes place on the QUIC working group Discussion of this draft takes place on the QUIC working group
mailing list (quic@ietf.org), which is archived at mailing list (quic@ietf.org), which is archived at
https://mailarchive.ietf.org/arch/search/?email_list=quic . https://mailarchive.ietf.org/arch/search/?email_list=quic.
Working Group information can be found at https://github.com/quicwg ; Working Group information can be found at https://github.com/quicwg;
source code and issues list for this draft can be found at source code and issues list for this draft can be found at
https://github.com/quicwg/base-drafts/labels/recovery . 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 November 22, 2017. This Internet-Draft will expire on December 15, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2017 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
skipping to change at page 7, line 17 skipping to change at page 7, line 17
tlp_count: The number of times a tail loss probe has been sent tlp_count: The number of times a tail loss probe has been sent
without receiving an ack. without receiving an ack.
rto_count: The number of times an rto has been sent without rto_count: The number of times an rto has been sent without
receiving an ack. receiving an ack.
largest_sent_before_rto: The last packet number sent prior to the largest_sent_before_rto: The last packet number sent prior to the
first retransmission timeout. first retransmission timeout.
time_of_last_sent_packet: The time the most recent packet was sent.
latest_rtt: The most recent RTT measurement made when receiving an
ack for a previously unacked packet.
smoothed_rtt: The smoothed RTT of the connection, computed as smoothed_rtt: The smoothed RTT of the connection, computed as
described in [RFC6298] described in [RFC6298]
rttvar: The RTT variance, computed as described in [RFC6298] rttvar: The RTT variance, computed as described in [RFC6298]
reordering_threshold: The largest delta between the largest acked 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.
time_reordering_fraction: The reordering window as a fraction of time_reordering_fraction: The reordering window as a fraction of
skipping to change at page 8, line 19 skipping to change at page 8, line 19
if (UsingTimeLossDetection()) if (UsingTimeLossDetection())
reordering_threshold = infinite reordering_threshold = infinite
time_reordering_fraction = kTimeReorderingFraction time_reordering_fraction = kTimeReorderingFraction
else: else:
reordering_threshold = kReorderingThreshold reordering_threshold = kReorderingThreshold
time_reordering_fraction = infinite time_reordering_fraction = infinite
loss_time = 0 loss_time = 0
smoothed_rtt = 0 smoothed_rtt = 0
rttvar = 0 rttvar = 0
largest_sent_before_rto = 0 largest_sent_before_rto = 0
time_of_last_sent_packet = 0
3.2.4. On Sending a Packet 3.2.4. 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_retransmittable: A boolean that indicates whether the packet o is_retransmittable: A boolean that indicates whether the packet
skipping to change at page 8, line 40 skipping to change at page 8, line 41
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.
o sent_bytes: The number of bytes sent in the packet. o sent_bytes: The number of bytes sent in the packet.
Pseudocode for OnPacketSent follows: Pseudocode for OnPacketSent follows:
OnPacketSent(packet_number, is_retransmittable, sent_bytes): OnPacketSent(packet_number, is_retransmittable, sent_bytes):
time_of_last_sent_packet = now;
sent_packets[packet_number].packet_number = packet_number sent_packets[packet_number].packet_number = packet_number
sent_packets[packet_number].time = now sent_packets[packet_number].time = now
if is_retransmittable: if is_retransmittable:
sent_packets[packet_number].bytes = sent_bytes sent_packets[packet_number].bytes = sent_bytes
SetLossDetectionAlarm() SetLossDetectionAlarm()
3.2.5. On Ack Receipt 3.2.5. On Ack Receipt
When an ack is received, it may acknowledge 0 or more packets. When an ack is received, it may acknowledge 0 or more packets.
The sender MUST abort the connection if it receives an ACK for a
packet it never sent, see [QUIC-TRANSPORT].
Pseudocode for OnAckReceived and UpdateRtt follow: Pseudocode for OnAckReceived and UpdateRtt follow:
OnAckReceived(ack): OnAckReceived(ack):
// If the largest acked is newly acked, update the RTT. // If the largest acked is newly acked, update the RTT.
if (sent_packets[ack.largest_acked]): if (sent_packets[ack.largest_acked]):
rtt_sample = now - sent_packets[ack.largest_acked].time latest_rtt = now - sent_packets[ack.largest_acked].time
if (rtt_sample > ack.ack_delay): if (latest_rtt > ack.ack_delay):
rtt_sample -= ack.delay latest_rtt -= ack.delay
UpdateRtt(rtt_sample) UpdateRtt(latest_rtt)
// The sender may skip packets for detecting optimistic ACKs
if (packets acked that the sender skipped):
abortConnection()
// Find all newly acked packets. // Find all newly acked packets.
for acked_packet in DetermineNewlyAckedPackets(): for acked_packet in DetermineNewlyAckedPackets():
OnPacketAcked(acked_packet.packet_number) OnPacketAcked(acked_packet.packet_number)
DetectLostPackets(ack.largest_acked_packet) DetectLostPackets(ack.largest_acked_packet)
SetLossDetectionAlarm() SetLossDetectionAlarm()
UpdateRtt(rtt_sample): UpdateRtt(latest_rtt):
// Based on {{RFC6298}}. // Based on {{RFC6298}}.
if (smoothed_rtt == 0): if (smoothed_rtt == 0):
smoothed_rtt = rtt_sample smoothed_rtt = latest_rtt
rttvar = rtt_sample / 2 rttvar = latest_rtt / 2
else: else:
rttvar = 3/4 * rttvar + 1/4 * (smoothed_rtt - rtt_sample) rttvar = 3/4 * rttvar + 1/4 * (smoothed_rtt - latest_rtt)
smoothed_rtt = 7/8 * smoothed_rtt + 1/8 * rtt_sample smoothed_rtt = 7/8 * smoothed_rtt + 1/8 * latest_rtt
3.2.6. On Packet Acknowledgment 3.2.6. 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
skipping to change at page 16, line 41 skipping to change at page 16, line 41
This document has no IANA actions. Yet. This document has no IANA actions. Yet.
6. References 6. References
6.1. Normative References 6.1. Normative References
[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", draft-ietf-quic- Multiplexed and Secure Transport", draft-ietf-quic-
transport (work in progress), May 2017. transport (work in progress), June 2017.
[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>.
6.2. Informative References 6.2. Informative References
[LOSS-PROBE] [LOSS-PROBE]
Dukkipati, N., Cardwell, N., Cheng, Y., and M. Mathis, Dukkipati, N., Cardwell, N., Cheng, Y., and M. Mathis,
 End of changes. 15 change blocks. 
22 lines changed or deleted 23 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/