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 an enum indicating the timer_mode #3182

Closed
wants to merge 1 commit into from
Closed
Changes from all 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
19 changes: 13 additions & 6 deletions draft-ietf-quic-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,10 @@ max_ack_delay:
loss_detection_timer:
Copy link
Contributor

Choose a reason for hiding this comment

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

rename this to "timer", with description "multi-modal timer used for loss detection and for sending probes."

: Multi-modal timer used for loss detection.

timer_mode:
: An enum with values of LOSS_DETECTION and PTO, indicating whether the timer
is set waiting for time threshold loss detection or sending a probe timeout.

pto_count:
: The number of times a PTO has been sent without receiving an ack.

Expand Down Expand Up @@ -1121,6 +1125,7 @@ SetLossDetectionTimer():
if (loss_time != 0):
// Time threshold loss detection.
loss_detection_timer.update(loss_time)
timer_mode = LOSS_DETECTION
return

if (no ack-eliciting packets in flight &&
Expand All @@ -1139,6 +1144,7 @@ SetLossDetectionTimer():

loss_detection_timer.update(
time_of_last_sent_ack_eliciting_packet + timeout)
timer_mode = PTO
~~~


Expand All @@ -1151,12 +1157,13 @@ Pseudocode for OnLossDetectionTimeout follows:

~~~
OnLossDetectionTimeout():
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps rename this to OnTimeout

loss_time, pn_space = GetEarliestLossTime()
if (loss_time != 0):
// Time threshold loss Detection
DetectLostPackets(pn_space)
SetLossDetectionTimer()
return
if (timer_mode == LOSS_DETECTION):
loss_time, pn_space = GetEarliestLossTime()
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.

So, this should not be required. Specifically, I think what we might want here is an ASSERT(loss_time != 0), though an assert might be too harsh. Maybe a warning and return.

Also below, under the else for a PTO, add an assert that mode is PTO.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we either need an if check or an ASSERT. The following code does not work correctly if you did enter it code and loss_time was 0.

// Time threshold loss Detection
DetectLostPackets(pn_space)
SetLossDetectionTimer()
return

if (endpoint is client without 1-RTT keys):
// Client sends an anti-deadlock packet: Initial is padded
Expand Down