From 6654eb263da11995196507353cbe0582af7a931f Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Sat, 15 Dec 2018 17:35:50 +0000 Subject: [PATCH 1/4] Use 'time_sent' instead of 'time' consistently The field was originally called "time", but now "time_sent" is used in DetectLostPackets() and it seems more descriptive, so use it everywhere. --- draft-ietf-quic-recovery.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 976c4414a3..3ccce083d0 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -541,7 +541,7 @@ sent_bytes: : The number of bytes sent in the packet, not including UDP or IP overhead, but including QUIC framing overhead. -time: +time_sent: : The time the packet was sent. @@ -659,7 +659,7 @@ Pseudocode for OnPacketSent follows: is_crypto_packet, sent_bytes): largest_sent_packet = packet_number sent_packets[packet_number].packet_number = packet_number - sent_packets[packet_number].time = now + sent_packets[packet_number].time_sent = now sent_packets[packet_number].ack_eliciting = ack_eliciting sent_packets[packet_number].in_flight = in_flight if (ack_eliciting): @@ -683,7 +683,7 @@ Pseudocode for OnAckReceived and UpdateRtt follow: // ack-eliciting, update the RTT. if (sent_packets[ack.largest_acked] && sent_packets[ack.largest_acked].ack_eliciting): - latest_rtt = now - sent_packets[ack.largest_acked].time + latest_rtt = now - sent_packets[ack.largest_acked].time_sent UpdateRtt(latest_rtt, ack.ack_delay) // Find all newly acked packets in this ACK frame @@ -1080,7 +1080,7 @@ acked_packet from sent_packets. OnPacketAckedCC(acked_packet): // Remove from bytes_in_flight. bytes_in_flight -= acked_packet.size - if (InRecovery(acked_packet.time)): + if (InRecovery(acked_packet.time_sent)): // Do not increase congestion window in recovery period. return if (congestion_window < ssthresh): @@ -1125,7 +1125,7 @@ Invoked when an ACK frame with an ECN section is received from the peer. // Start a new congestion event if the last acknowledged // packet was sent after the start of the previous // recovery epoch. - CongestionEvent(sent_packets[ack.largest_acked].time) + CongestionEvent(sent_packets[ack.largest_acked].time_sent) ~~~ @@ -1143,7 +1143,7 @@ are detected lost. // Start a new congestion epoch if the last lost packet // is past the end of the previous recovery epoch. - CongestionEvent(largest_lost_packet.time) + CongestionEvent(largest_lost_packet.time_sent) ~~~ From e3b8bf3fa3951ce9007a0bc135a97516ba1cb86e Mon Sep 17 00:00:00 2001 From: janaiyengar Date: Sun, 16 Dec 2018 11:14:14 -0800 Subject: [PATCH 2/4] Fix lint --- draft-ietf-quic-recovery.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 3ccce083d0..21c772b192 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -683,7 +683,8 @@ Pseudocode for OnAckReceived and UpdateRtt follow: // ack-eliciting, update the RTT. if (sent_packets[ack.largest_acked] && sent_packets[ack.largest_acked].ack_eliciting): - latest_rtt = now - sent_packets[ack.largest_acked].time_sent + latest_rtt = now - + sent_packets[ack.largest_acked].time_sent UpdateRtt(latest_rtt, ack.ack_delay) // Find all newly acked packets in this ACK frame From b87dad30a88aefd393033e51d5519a5db7f654e9 Mon Sep 17 00:00:00 2001 From: janaiyengar Date: Sun, 16 Dec 2018 11:15:27 -0800 Subject: [PATCH 3/4] fix formatting --- draft-ietf-quic-recovery.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 21c772b192..8202b9cc66 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -684,7 +684,7 @@ Pseudocode for OnAckReceived and UpdateRtt follow: if (sent_packets[ack.largest_acked] && sent_packets[ack.largest_acked].ack_eliciting): latest_rtt = now - - sent_packets[ack.largest_acked].time_sent + sent_packets[ack.largest_acked].time_sent UpdateRtt(latest_rtt, ack.ack_delay) // Find all newly acked packets in this ACK frame From 91da5d45c909ea8877fd17b6ad028b5f220601d7 Mon Sep 17 00:00:00 2001 From: janaiyengar Date: Sun, 16 Dec 2018 11:20:45 -0800 Subject: [PATCH 4/4] I hate the online editor --- draft-ietf-quic-recovery.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 8202b9cc66..45dc0c0354 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -683,8 +683,8 @@ Pseudocode for OnAckReceived and UpdateRtt follow: // ack-eliciting, update the RTT. if (sent_packets[ack.largest_acked] && sent_packets[ack.largest_acked].ack_eliciting): - latest_rtt = now - - sent_packets[ack.largest_acked].time_sent + latest_rtt = + now - sent_packets[ack.largest_acked].time_sent UpdateRtt(latest_rtt, ack.ack_delay) // Find all newly acked packets in this ACK frame