Skip to content

Commit

Permalink
Added textual description of ECN-CE indicating congestion events.
Browse files Browse the repository at this point in the history
  • Loading branch information
gloinul committed May 28, 2018
1 parent f71e933 commit fc94546
Showing 1 changed file with 64 additions and 29 deletions.
93 changes: 64 additions & 29 deletions draft-ietf-quic-recovery.md
Expand Up @@ -417,6 +417,11 @@ to accelerate loss recovery. The receiver SHOULD send an immediate ACK
when it receives a new packet which is not one greater than the
largest received packet number.

Also, reception of an packet marked as ECN Congestion Experience (ECN-CE)
SHOULD be acknowledged more quickly to quicker react to congesiton events.
Additional ECN-CE marks received during the same recovery period does
not need to be immediately acknowledged. See {{congestion-ecn}}.

As an optimization, a receiver MAY process multiple packets before
sending any ACK frames in response. In this case they can determine
whether an immediate or delayed acknowledgement should be generated
Expand Down Expand Up @@ -625,7 +630,9 @@ Pseudocode for OnPacketSent follows:

### On Ack Receipt

When an ack is received, it may acknowledge 0 or more packets.
When an ack (ACK or ACK_ECN frame) is received, it may acknowledge 0
or more packets. Reception of ACK_ECN frame requires that the receiver
check if ECN indicates a congestion event, see {{congestion-ecn}}.

Pseudocode for OnAckReceived and UpdateRtt follow:

Expand All @@ -642,8 +649,8 @@ Pseudocode for OnAckReceived and UpdateRtt follow:

DetectLostPackets(ack.largest_acked_packet)
SetLossDetectionAlarm()
// Detect if ACK_ECN frame indicates ECN marking
if (ack is of type ACK_ECN):
// Detect if ACK_ECN frame indicates ECN-CE marking
if (Frame type is of type ACK_ECN):
OnPacketsMarked(ack.ce_counter)


Expand Down Expand Up @@ -678,7 +685,7 @@ newly acked packet.

If this is the first acknowledgement following RTO, check if the smallest newly
acknowledged packet is one sent by the RTO, and if so, inform congestion control
of a verified RTO, similar to F-RTO {{?RFC5682}}
of a verified RTO, similar to F-RTO {{?RFC5682}}.

Pseudocode for OnPacketAcked follows:

Expand Down Expand Up @@ -883,13 +890,31 @@ QUIC hosts MUST NOT send packets if they would increase bytes_in_flight
the packet is a probe packet sent after the TLP or RTO alarm fires, as described
in {{tlp}} and {{rto}}.

## Explicit Congestion Notification {#congestion-ecn}

If ECN {!RFC3168} has been verified to work for the current path QUIC
will use the ECN Congestion Experienced (ECN-CE) IP packet marking as a
signal of congestion as a complement to paket loss. This document
specifies to use the classical ECN-CE response, i.e. the same response
as for packet loss. However, there exist potenatial for future
experimentation in using other response functions as discussed in
{!RFC8311}.

The ACK_ECN frame defined in {{QUIC-TRANSPORT}} does not provide
information on which of the newely acknowledged packets that
was marked with ECN-CE. Therefore, it will be assumed that
the congestion event starts at the highest acknowledged packet
number.

## Slow Start

QUIC begins every connection in slow start and exits slow start upon
loss. QUIC re-enters slow start anytime the congestion window is less
than sshthresh, which typically only occurs after an RTO.
While in slow start, QUIC increases the congestion window by the
number of acknowledged bytes when each ack is processed.
QUIC begins every connection in slow start and exits slow start upon
loss or reception of ECN-CE packet markings. QUIC re-enters slow start
anytime the congestion window is less than sshthresh, which typically
only occurs after an RTO. While in slow start, QUIC increases the
congestion window by the number of acknowledged bytes when each ack is
processed.


## Congestion Avoidance

Expand All @@ -901,18 +926,20 @@ window and sets the slow start threshold to the new congestion window.

## Recovery Period

Recovery is a period of time beginning with detection of a lost packet.
Because QUIC retransmits stream data and control frames, not packets,
it defines the end of recovery as a packet sent after the start of
recovery being acknowledged. This is slightly different from TCP's
definition of recovery ending when the lost packet that started
recovery is acknowledged.
Recovery is a period of time beginning with detection of a lost packet
or the reception of an ECN-CE mark. Because QUIC retransmits stream data
and control frames, not packets, it defines the end of recovery as a
packet sent after the start of recovery being acknowledged. This is
slightly different from TCP's definition of recovery ending when the
lost packet that started recovery is acknowledged.

During recovery, the congestion window is not increased or decreased. As
such, multiple lost packets and/or ECN-CE marks only decrease the
congestion window once as long as they're lost before exiting recovery.
This causes QUIC to decrease the congestion window multiple times if
retransmisions are lost, but limits the reduction to once per round
trip.

During recovery, the congestion window is not increased or decreased.
As such, multiple lost packets only decrease the congestion window once as
long as they're lost before exiting recovery. This causes QUIC to decrease
the congestion window multiple times if retransmisions are lost, but limits
the reduction to once per round trip.

## Tail Loss Probe

Expand Down Expand Up @@ -980,6 +1007,12 @@ kLossReductionFactor (default 0.5):
Variables required to implement the congestion control mechanisms
are described in this section.

ack_ce_cntr:
: The ACK_ECN counter for ECN-CE marks previously processed. Used to
determine when one or more packet acknowledged by the ACK_ECN frame
was marked with ECN-CE.


bytes_in_flight:
: The sum of the size in bytes of all sent packets that contain at least
one retransmittable frame, and have not been acked or declared
Expand Down Expand Up @@ -1009,6 +1042,7 @@ variables as follows:
bytes_in_flight = 0
end_of_recovery = 0
ssthresh = infinite
ack_ce_cntr = 0
~~~

### On Packet Sent
Expand Down Expand Up @@ -1048,19 +1082,20 @@ acked_packet from sent_packets.
### On Packets Marked

Invoked by an increment in the number of CE marked packets, as
indicated by a newly received ACK_ECN frame. The variable ack_ce_counter
is used to check if packets are recently CE marked.
indicated by a newly received ACK_ECN frame when compared to
ack_ce_cntr.

~~~
OnPacketsMarked(ce_counter):
if (end_of_recovery < largest_acked_packet && ce_counter > ack_ce_cntr):
// Start a new congestion epoch
end_of_recovery = largest_sent_packet
congestion_window *= kMarkReductionFactor
congestion_window = max(congestion_window, kMinimumWindow)
ssthresh = congestion_window
// update ack_ce_cntr
if (ce_counter > ack_ce_cntr):
// update ack_ce_cntr
ack_ce_cntr = ce_counter
if (!InRecovery(largest_acked_packet)):
// Start a new congestion epoch
end_of_recovery = largest_sent_packet
congestion_window *= kMarkReductionFactor
congestion_window = max(congestion_window, kMinimumWindow)
ssthresh = congestion_window
~~~


Expand Down

0 comments on commit fc94546

Please sign in to comment.