-
Notifications
You must be signed in to change notification settings - Fork 205
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
Fix time loss detection and early retransmit #394
Conversation
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.
Thanks Ian, a few comments
draft-ietf-quic-recovery.md
Outdated
threshold in time, rather than in packet number gaps. | ||
loss_time: | ||
: The time at which the next packet will be considered lost based on early | ||
transmit or exceeding the reordering window in time. |
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.
early transmit --> early retransmit
draft-ietf-quic-recovery.md
Outdated
packet's size. | ||
: An association of packet numbers to information about them, including a number | ||
field indicating the packet number, a time field indicating the time a packet | ||
was sent and a bytes field indicating the packet's size. sent_packets is |
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.
oxford comma nit: "... was sent, and a bytes field ..."
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.
Done.
draft-ietf-quic-recovery.md
Outdated
field indicating the packet number, a time field indicating the time a packet | ||
was sent and a bytes field indicating the packet's size. sent_packets is | ||
ordered by packet number, and packets remain in sent_packets until | ||
acknowledged or lost. |
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.
nit: "until they are acknowledged or lost"
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.
I left it as is, because it's shorter.
draft-ietf-quic-recovery.md
Outdated
else: | ||
reordering_threshold = kReorderingThreshold | ||
time_reordering_fraction = infinite | ||
lost_time = 0 |
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.
loss_time = 0
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.
SGTM, I went with loss_time everywhere.
@@ -406,10 +410,9 @@ Pseudocode for SetLossDetectionAlarm follows: | |||
alarm_duration = 2 * smoothed_rtt | |||
alarm_duration = max(alarm_duration, kMinTLPTimeout) | |||
alarm_duration = alarm_duration << handshake_count | |||
else if (largest sent packet is acked): | |||
// Early retransmit | |||
// with an alarm to reduce spurious retransmits. |
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.
I think this comment can fit in a line
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.
It was removed.
draft-ietf-quic-recovery.md
Outdated
time_delta = acked.time_sent - unacked.time_sent | ||
packet_delta = acked.packet_number - unacked.packet_number | ||
if (time_delta > kTimeReorderThreshold * smoothed_rtt): | ||
time_when_lost = 0; |
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.
This isn't the time but a wait period... suggestion: reordering_period ? or "short_timeout"? you could just call it short_timeout_period... up to you
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.
How about delay_until_lost?
draft-ietf-quic-recovery.md
Outdated
packet_delta = acked.packet_number - unacked.packet_number | ||
if (time_delta > kTimeReorderThreshold * smoothed_rtt): | ||
time_when_lost = 0; | ||
if (time_reordering_fraction == infinite): |
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.
This should be !=
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.
Thanks.
draft-ietf-quic-recovery.md
Outdated
foreach (unacked less than largest_acked.packet_number): | ||
time_since_sent = now() - unacked.time_sent | ||
packet_delta = largest_acked.packet_number - unacked.packet_number | ||
if (time_since_sent > time_when_lost): |
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.
if time loss detection is disabled, won't time_when_lost be 0?
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.
Good point, I set it to infinite.
draft-ietf-quic-recovery.md
Outdated
lost_packets.insert(unacked) | ||
else if (packet_delta > reordering_threshold) | ||
lost_packets.insert(unacked) | ||
else if (loss_time == 0 && time_when_lost != 0): | ||
loss_time = time_when_lost - time_since_sent |
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.
add a comment here saying something like "loss_time is used for setting the loss detection alarm later."
OnPacketsLost(lost_packets) | ||
MaybeRetransmit(lost_packets) | ||
foreach (packet in lost_packets) | ||
sent_packets.remove(packet.packet_number) |
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.
does it make sense, for editorializing, to move these packets to a "lost_packets" structure? doesn't need to be done here, but thinking aloud
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.
Possibly, though I still need a way to inform the congestion control of newly lost packets. I was thinking of creating a pending_retransmissions data structure in congestion control to store any lost packets that couldn't be sent immediately?
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.
Thanks Jana, updated.
draft-ietf-quic-recovery.md
Outdated
packet's size. | ||
: An association of packet numbers to information about them, including a number | ||
field indicating the packet number, a time field indicating the time a packet | ||
was sent and a bytes field indicating the packet's size. sent_packets is |
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.
Done.
draft-ietf-quic-recovery.md
Outdated
field indicating the packet number, a time field indicating the time a packet | ||
was sent and a bytes field indicating the packet's size. sent_packets is | ||
ordered by packet number, and packets remain in sent_packets until | ||
acknowledged or lost. |
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.
I left it as is, because it's shorter.
@@ -406,10 +410,9 @@ Pseudocode for SetLossDetectionAlarm follows: | |||
alarm_duration = 2 * smoothed_rtt | |||
alarm_duration = max(alarm_duration, kMinTLPTimeout) | |||
alarm_duration = alarm_duration << handshake_count | |||
else if (largest sent packet is acked): | |||
// Early retransmit | |||
// with an alarm to reduce spurious retransmits. |
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.
It was removed.
draft-ietf-quic-recovery.md
Outdated
else: | ||
reordering_threshold = kReorderingThreshold | ||
time_reordering_fraction = infinite | ||
lost_time = 0 |
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.
SGTM, I went with loss_time everywhere.
draft-ietf-quic-recovery.md
Outdated
@@ -442,9 +445,9 @@ Pseudocode for OnLossDetectionAlarm follows: | |||
RetransmitAllHandshakePackets(); | |||
handshake_count++; | |||
// TODO: Clarify early retransmit and time loss. | |||
else if (): | |||
else if (lost_time != 0): |
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.
Done
@@ -481,19 +484,31 @@ DetectLostPackets takes one parameter, acked, which is the largest acked packet. | |||
Pseudocode for DetectLostPackets follows: | |||
|
|||
~~~ | |||
DetectLostPackets(acked): | |||
DetectLostPackets(largest_acked): |
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.
It's a packet, not a number, because I use fields of the packet below, such as the time it was sent.
draft-ietf-quic-recovery.md
Outdated
packet_delta = acked.packet_number - unacked.packet_number | ||
if (time_delta > kTimeReorderThreshold * smoothed_rtt): | ||
time_when_lost = 0; | ||
if (time_reordering_fraction == infinite): |
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.
Thanks.
draft-ietf-quic-recovery.md
Outdated
time_delta = acked.time_sent - unacked.time_sent | ||
packet_delta = acked.packet_number - unacked.packet_number | ||
if (time_delta > kTimeReorderThreshold * smoothed_rtt): | ||
time_when_lost = 0; |
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.
How about delay_until_lost?
draft-ietf-quic-recovery.md
Outdated
foreach (unacked less than largest_acked.packet_number): | ||
time_since_sent = now() - unacked.time_sent | ||
packet_delta = largest_acked.packet_number - unacked.packet_number | ||
if (time_since_sent > time_when_lost): |
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.
Good point, I set it to infinite.
OnPacketsLost(lost_packets) | ||
MaybeRetransmit(lost_packets) | ||
foreach (packet in lost_packets) | ||
sent_packets.remove(packet.packet_number) |
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.
Possibly, though I still need a way to inform the congestion control of newly lost packets. I was thinking of creating a pending_retransmissions data structure in congestion control to store any lost packets that couldn't be sent immediately?
No description provided.