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

Move key discard to loss recovery section #4173

Merged
merged 3 commits into from Oct 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 29 additions & 13 deletions draft-ietf-quic-recovery.md
Expand Up @@ -1574,6 +1574,26 @@ DetectAndRemoveLostPackets(pn_space):
~~~


## Upon Dropping Initial or Handshake Keys

When Initial or Handshake keys are discarded, packets from the space
are discarded and loss detection state is updated.

Pseudocode for OnPacketNumberSpaceDiscarded follows:

~~~
OnPacketNumberSpaceDiscarded(pn_space):
assert(pn_space != ApplicationData)
RemoveFromBytesInFlight(sent_packets[pn_space])
sent_packets[pn_space].clear()
// Reset the loss detection and PTO timer
time_of_last_ack_eliciting_packet[pn_space] = 0
loss_time[pn_space] = 0
pto_count = 0
SetLossDetectionTimer()
~~~


# Congestion Control Pseudocode

We now describe an example implementation of the congestion controller described
Expand Down Expand Up @@ -1769,28 +1789,24 @@ OnPacketsLost(lost_packets):
congestion_recovery_start_time = 0
~~~

## Upon dropping Initial or Handshake keys

When Initial or Handshake keys are discarded, packets from the space
are discarded and loss detection state is updated.
## Removing Discarded Packets From Bytes In Flight

Pseudocode for OnPacketNumberSpaceDiscarded follows:
When Initial or Handshake keys are discarded, packets sent in that space no
longer count toward bytes in flight.

Pseudocode for RemoveFromBytesInFlight follows:

~~~
OnPacketNumberSpaceDiscarded(pn_space):
assert(pn_space != ApplicationData)
RemoveFromBytesInFlight(discarded_packets):
// Remove any unacknowledged packets from flight.
foreach packet in sent_packets[pn_space]:
foreach packet in discarded_packets:
if packet.in_flight
bytes_in_flight -= size
sent_packets[pn_space].clear()
// Reset the loss detection and PTO timer
time_of_last_ack_eliciting_packet[pn_space] = 0
loss_time[pn_space] = 0
pto_count = 0
SetLossDetectionTimer()
~~~



# Change Log

> **RFC Editor's Note:** Please remove this section prior to
Expand Down