Skip to content

Commit

Permalink
Filter out packets sent before an RTT sample
Browse files Browse the repository at this point in the history
  • Loading branch information
martinthomson committed Sep 8, 2020
1 parent a8adc5d commit 779d923
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions draft-ietf-quic-recovery.md
Expand Up @@ -1589,6 +1589,9 @@ ssthresh:
the mode is slow start and the window grows by the number of bytes
acknowledged.

first_rtt_sample:
: The time that the first RTT sample was obtained.


## Initialization

Expand All @@ -1600,6 +1603,7 @@ congestion_window = kInitialWindow
bytes_in_flight = 0
congestion_recovery_start_time = 0
ssthresh = infinite
first_rtt_sample = 0
for pn_space in [ Initial, Handshake, ApplicationData ]:
ecn_ce_counters[pn_space] = 0
~~~
Expand All @@ -1626,6 +1630,9 @@ InCongestionRecovery(sent_time):
return sent_time <= congestion_recovery_start_time

OnPacketsAcked(acked_packets):
if (first_rtt_sample == 0):
first_rtt_sample = now()

for acked_packet in acked_packets:
OnPacketAcked(acked_packet)

Expand Down Expand Up @@ -1695,8 +1702,14 @@ OnPacketsLost(lost_packets):
for lost_packet in lost_packets:
bytes_in_flight -= lost_packet.sent_bytes
OnCongestionEvent(lost_packets.largest().time_sent)

// Reset the congestion window if the loss of these
// packets indicates persistent congestion.
// Disregard packets sent prior to getting an RTT sample.
assert(first_rtt_sample != 0)
for lost in lost_packets:
if lost.time_sent <= first_rtt_sample:
lost_packets.remove(lost)
if (InPersistentCongestion(lost_packets)):
congestion_window = kMinimumWindow
congestion_recovery_start_time = 0
Expand Down

0 comments on commit 779d923

Please sign in to comment.