Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some MUSTs to congestion control #3978

Merged
merged 17 commits into from
Sep 1, 2020
Merged
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 36 additions & 27 deletions draft-ietf-quic-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -763,40 +763,50 @@ The RECOMMENDED value is 2 * max_datagram_size.

## Slow Start

While in slow start, QUIC increases the congestion window by the
number of bytes acknowledged when each acknowledgment is processed, resulting
in exponential growth of the congestion window.
While in slow start, a NewReno sender increases the congestion window by the
number of bytes acknowledged when each acknowledgment is processed, resulting in
exponential growth of the congestion window.

QUIC exits slow start upon loss or upon increase in the ECN-CE counter.
When slow start is exited, the congestion window halves and the slow start
threshold is set to the new congestion window. QUIC re-enters slow start
any time the congestion window is less than the slow start threshold,
which only occurs after persistent congestion is declared.
A sender MUST exit slow start and enter recovery when a loss is detected or when
the ECN-CE counter reported by the peer increases.

A sender re-enters slow start any time the congestion window is less than the
slow start threshold, which only occurs after persistent congestion is declared.

## Congestion Avoidance

Slow start exits to congestion avoidance. Congestion avoidance uses an
Additive Increase Multiplicative Decrease (AIMD) approach that increases
the congestion window by one maximum packet size per congestion window
acknowledged. When a loss or ECN-CE marking is detected, NewReno halves
the congestion window, sets the slow start threshold to the new
congestion window, and then enters the recovery period.
A NewReno sender in congestion avoidance uses an Additive Increase
Multiplicative Decrease (AIMD) approach that MUST increase the congestion window
by no more than one maximum datagram size per congestion window acknowledged.

A sender MUST exit congestion avoidance and enter recovery when a loss is
detected or when the ECN-CE counter reported by the peer increases.

## Recovery Period

A recovery period is entered when loss or ECN-CE marking of a packet is
detected in congestion avoidance after the congestion window and slow start
threshold have been decreased. A recovery period ends when a packet sent
during the recovery period is acknowledged. This is slightly different from
TCP's definition of recovery, which ends when the lost packet that started
recovery is acknowledged.
A NewReno sender enters the recovery period when it detects loss or an ECN-CE
mark is received. A recovery period ends when a packet sent during the recovery
period is acknowledged.

A sender that is already in a recovery period stays in it and does not re-enter
it.

On entering recovery, a sender MUST do the following:

* set the slow start threshold to half the value of the congestion window at the
moment that loss is detected, and

* set the congestion window to the new value of the slow start
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still say that you have to set the cwnd to ssthresh when entering recovery. Saying that you have to do this when entering recovery and then saying that you may do it it later seems confusing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point - fixed

threshold. Implementations MAY set the congestion window immediately on
detecting loss or use other mechanisms, such as Proportional Rate Reduction
({{?RFC6937}}), to reduce it over the recovery period.

The recovery period aims to limit congestion window reduction to once per round
trip. Therefore during recovery, the congestion window remains unchanged
irrespective of new losses or increases in the ECN-CE counter.

When entering recovery, a single packet MAY be sent even if bytes in flight
now exceeds the recently reduced congestion window. This speeds up loss
When entering a recovery period, a single packet MAY be sent even if bytes in
flight now exceeds the recently reduced congestion window. This speeds up loss
recovery if the data in the lost packet is retransmitted and is similar to TCP
as described in Section 5 of {{?RFC6675}}. If further packets are lost while
the sender is in recovery, sending any packets in response MUST obey the
Expand Down Expand Up @@ -996,11 +1006,10 @@ Reporting additional ECN-CE markings will cause a sender to reduce their sending
rate, which is similar in effect to advertising reduced connection flow control
limits and so no advantage is gained by doing so.

Endpoints choose the congestion controller that they use. Though congestion
controllers generally treat reports of ECN-CE markings as equivalent to loss
({{?RFC8311}}), the exact response for each controller could be different.
Failure to correctly respond to information about ECN markings is therefore
difficult to detect.
Endpoints choose the congestion controller that they use. Congestion controllers
respond to reports of ECN-CE by reducing their rate, but the response may vary.
Markings can be treated as equivalent to loss ({{?RFC3168}}), but other
responses can be specified, such as ({{?RFC8511}}) or ({{?RFC8311}}).


# IANA Considerations
Expand Down