-
Notifications
You must be signed in to change notification settings - Fork 204
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -932,6 +932,10 @@ max_ack_delay: | |
loss_detection_timer: | ||
: 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. | ||
|
||
|
@@ -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 && | ||
|
@@ -1139,6 +1144,7 @@ SetLossDetectionTimer(): | |
|
||
loss_detection_timer.update( | ||
time_of_last_sent_ack_eliciting_packet + timeout) | ||
timer_mode = PTO | ||
~~~ | ||
|
||
|
||
|
@@ -1151,12 +1157,13 @@ Pseudocode for OnLossDetectionTimeout follows: | |
|
||
~~~ | ||
OnLossDetectionTimeout(): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
There was a problem hiding this comment.
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."