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

update the pseudo code to include packet number spaces #2417

Merged
Merged
Changes from 1 commit
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
14 changes: 7 additions & 7 deletions draft-ietf-quic-recovery.md
Expand Up @@ -825,7 +825,7 @@ kPacketNumberSpace:
enum kPacketNumberSpace {
Initial,
Handshake,
Application data,
ApplicationData,
}
~~~

Expand Down Expand Up @@ -878,7 +878,7 @@ max_ack_delay:

loss_time:
: The time at which the next packet will be considered lost based on
exceeding the reordering window in time. Only applies to the Application data
exceeding the reordering window in time. Only applies to the ApplicationData
packet number space.

sent_packets[kPacketNumberSpace]:
Expand Down Expand Up @@ -1047,7 +1047,7 @@ SetLossDetectionTimer():
return
if (loss_time != 0):
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 (loss_time != 0):
if (loss_time != 0):

// Time threshold loss detection.
// Only applies to the Application data packet number space.
// Only applies to the ApplicationData packet number space.
loss_detection_timer.update(loss_time)
return

Expand Down Expand Up @@ -1077,8 +1077,8 @@ OnLossDetectionTimeout():
crypto_count++
else if (loss_time != 0):
// Time threshold loss Detection
// Only applies to the Application data packet number space.
DetectLostPackets(Application data)
// Only applies to the ApplicationData packet number space.
DetectLostPackets(ApplicationData)
else:
// PTO
SendOneOrTwoPackets()
Expand All @@ -1099,7 +1099,7 @@ Pseudocode for DetectLostPackets follows:

~~~
DetectLostPackets(pn_space):
if (pn_space == Application data):
if (pn_space == ApplicationData):
loss_time = 0
lost_packets = {}
loss_delay = kTimeThreshold * max(latest_rtt, smoothed_rtt)
Expand All @@ -1120,7 +1120,7 @@ DetectLostPackets(pn_space):
sent_packets.remove(unacked.packet_number)
if (unacked.in_flight):
lost_packets.insert(unacked)
else if (pn_space == Application data):
else if (pn_space == ApplicationData):
if (loss_time == 0):
loss_time = unacked.time_sent + loss_delay
else:
Expand Down