From e31cea24525fa59ec6a83584751c298d204613bb Mon Sep 17 00:00:00 2001 From: ianswett Date: Thu, 10 Dec 2020 08:06:20 -0500 Subject: [PATCH 1/3] Add 'time' to latest_in_flight_lost I'm not sure this is the best name, but I think adding 'time' to the variable makes this easier to read, particularly since the variable is initialized to 0, which is not really a time. Follow-up to #4426 --- draft-ietf-quic-recovery.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 83bc05192d..26889bbc3f 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1811,16 +1811,16 @@ Invoked when DetectAndRemoveLostPackets deems packets lost. ~~~ OnPacketsLost(lost_packets): - latest_in_flight_lost = 0 + latest_time_of_in_flight_lost = 0 // Remove lost packets from bytes_in_flight. for lost_packet in lost_packets: if lost_packet.in_flight: bytes_in_flight -= lost_packet.sent_bytes - latest_in_flight_lost = - max(latest_in_flight_lost, lost_packet.time_sent) + latest_time_of_in_flight_lost = + max(latest_time_of_in_flight_lost, lost_packet.time_sent) // Congestion event if in-flight packets were lost - if (latest_in_flight_lost != 0): - OnCongestionEvent(latest_in_flight_lost) + if (latest_time_of_in_flight_lost != 0): + OnCongestionEvent(latest_time_of_in_flight_lost) // Reset the congestion window if the loss of these // packets indicates persistent congestion. From a8acd4f6fbd38e8a9a6c8651cc36759e39be129f Mon Sep 17 00:00:00 2001 From: ianswett Date: Thu, 10 Dec 2020 08:09:41 -0500 Subject: [PATCH 2/3] Update draft-ietf-quic-recovery.md --- draft-ietf-quic-recovery.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 26889bbc3f..34b3e7d18e 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1811,16 +1811,16 @@ Invoked when DetectAndRemoveLostPackets deems packets lost. ~~~ OnPacketsLost(lost_packets): - latest_time_of_in_flight_lost = 0 + time_of_latest_in_flight_loss = 0 // Remove lost packets from bytes_in_flight. for lost_packet in lost_packets: if lost_packet.in_flight: bytes_in_flight -= lost_packet.sent_bytes - latest_time_of_in_flight_lost = - max(latest_time_of_in_flight_lost, lost_packet.time_sent) + time_of_latest_in_flight_loss = + max(time_of_latest_in_flight_loss, lost_packet.time_sent) // Congestion event if in-flight packets were lost - if (latest_time_of_in_flight_lost != 0): - OnCongestionEvent(latest_time_of_in_flight_lost) + if (time_of_latest_in_flight_loss != 0): + OnCongestionEvent(time_of_latest_in_flight_loss) // Reset the congestion window if the loss of these // packets indicates persistent congestion. From 1d6e7068af4438bee467d8a88190a05c6d4b5d10 Mon Sep 17 00:00:00 2001 From: ianswett Date: Fri, 11 Dec 2020 17:31:07 -0500 Subject: [PATCH 3/3] MT's suggestion --- draft-ietf-quic-recovery.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 34b3e7d18e..278d837a4c 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1811,16 +1811,16 @@ Invoked when DetectAndRemoveLostPackets deems packets lost. ~~~ OnPacketsLost(lost_packets): - time_of_latest_in_flight_loss = 0 + sent_time_of_last_loss = 0 // Remove lost packets from bytes_in_flight. for lost_packet in lost_packets: if lost_packet.in_flight: bytes_in_flight -= lost_packet.sent_bytes - time_of_latest_in_flight_loss = - max(time_of_latest_in_flight_loss, lost_packet.time_sent) + sent_time_of_last_loss = + max(sent_time_of_last_loss, lost_packet.time_sent) // Congestion event if in-flight packets were lost - if (time_of_latest_in_flight_loss != 0): - OnCongestionEvent(time_of_latest_in_flight_loss) + if (sent_time_of_last_loss != 0): + OnCongestionEvent(sent_time_of_last_loss) // Reset the congestion window if the loss of these // packets indicates persistent congestion.