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

Persistent congestion pseudocode to match text #4010

Closed
wants to merge 7 commits into from
Closed
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions draft-ietf-quic-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -1517,7 +1517,7 @@ variables as follows:
bytes_in_flight = 0
congestion_recovery_start_time = 0
ssthresh = infinite
first_rtt_sample = never
first_rtt_sample = 0
for pn_space in [ Initial, Handshake, ApplicationData ]:
ecn_ce_counters[pn_space] = 0
~~~
Expand Down Expand Up @@ -1551,7 +1551,7 @@ newly acked_packets from sent_packets.
// Remove from bytes_in_flight.
bytes_in_flight -= acked_packet.sent_bytes

if (first_rtt_sample is never):
if (first_rtt_sample == 0):
first_rtt_sample = now()

// Do not increase congestion_window if application
Expand Down Expand Up @@ -1621,7 +1621,7 @@ Invoked when DetectAndRemoveLostPackets deems packets lost.

// Only look for persistent congestion if the period
// starts after getting the first RTT sample.
assert(first_rtt_sample is not never)
assert(first_rtt_sample != 0)
if (largest_lost.time_sent - pc_period > first_rtt_sample):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (largest_lost.time_sent - pc_period > first_rtt_sample):
if (smallest_lost.time_sent - pc_period > first_rtt_sample):

Copy link
Member Author

Choose a reason for hiding this comment

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

largest_lost is the name of the variable we have. This says that the span of length pc_period that ends at the time that the largest lost was sent must start after we first got an RTT sample.

Copy link
Member Author

Choose a reason for hiding this comment

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

FWIW, this is AllPacketsLost is not a fair representation of the algorithm in the latest PR. Only the largest ack-eliciting packet is relevant, and the function needs to ensure that it only considers the first ack-eliciting packet. But I guess we're abstracting over much of that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, we're glossing over a few implementation details with AreAllPacketsLost() below, but I think this is detailed enough.

Copy link
Contributor

Choose a reason for hiding this comment

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

See my comment below. You can change the param here to lost_packets. I would suggest the following:

We could make AreAllPacketsLostInPeriod() return the starting point of the persistent congestion period, and use that up here. Meaning call that function first and then check to see if that period starts after first_rtt_sample.

return false

Expand Down