Subject: [quicwg/base-drafts] recovery: pseudo code update for changes in #4421 (#4426)

From: msvoelker <[email-masked]>
Date: Mon, 07 Dec 2020 23:13:40 -0800

I changed the pseudo code such that the function InPersistentCongestion gets all lost packets sent after the first RTT sample, not only those that count as in flight.
You can view, comment on, or merge this pull request online at:

  https://github.com/quicwg/base-drafts/pull/4426

-- Commit Summary --

  * recovery: pseudo code update for changes in #4421

-- File Changes --

    M draft-ietf-quic-recovery.md (12)

-- Patch Links --

https://github.com/quicwg/base-drafts/pull/4426.patch
https://github.com/quicwg/base-drafts/pull/4426.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/4426

---

From: ianswett <[email-masked]>
Date: Tue, 08 Dec 2020 10:24:10 -0800

@ianswett approved this pull request.

Thanks, I think this looks good, but it's easy to make subtle errors in the pseudocode, so I definitely want @janaiyengar review as well.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/4426#pullrequestreview-547508101

---

From: Jana Iyengar <[email-masked]>
Date: Wed, 09 Dec 2020 21:47:22 -0800

@janaiyengar commented on this pull request.

Thanks for your changes, @msvoelker. A few suggestions, but this is good.

> @@ -1807,11 +1806,14 @@ Invoked when DetectAndRemoveLostPackets deems packets lost.
 
 ~~~
 OnPacketsLost(lost_packets):
+  time_of_last_in_flight_packet = 0

```suggestion
  latest_in_flight_lost = 0
```

>    // Remove lost packets from bytes_in_flight.
   for lost_packet in lost_packets:
-    assert(lost_packet.in_flight)
-    bytes_in_flight -= lost_packet.sent_bytes
-  OnCongestionEvent(lost_packets.largest().time_sent)
+    if lost_packet.in_flight:
+      bytes_in_flight -= lost_packet.sent_bytes
+      time_of_last_in_flight_packet = max(time_of_last_in_flight_packet, lost_packet.time_sent)

```suggestion
      latest_in_flight_lost = max(latest_in_flight_lost, lost_packet.time_sent)
```

> +  if (time_of_last_in_flight_packet != 0):
+    OnCongestionEvent(time_of_last_in_flight_packet)

```suggestion
  // Congestion event if any in-flight packets were lost 
  if (latest_in_flight_lost != 0):
    OnCongestionEvent(latest_in_flight_lost)
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/4426#pullrequestreview-548836557

---

From: Jana Iyengar <[email-masked]>
Date: Wed, 09 Dec 2020 21:48:14 -0800

@janaiyengar pushed 1 commit.

6d29ee6c5b1afbfaac3c29b5c4ce8d2020679767  Apply suggestions from code review

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/4426/files/5fa3e97d9586897698c26d51ce9efb3aacaff889..6d29ee6c5b1afbfaac3c29b5c4ce8d2020679767

---

From: Jana Iyengar <[email-masked]>
Date: Wed, 09 Dec 2020 21:51:46 -0800

+      latest_in_flight_lost = max(latest_in_flight_lost, lost_packet.time_sent)

```suggestion
      latest_in_flight_lost =
        max(latest_in_flight_lost, lost_packet.time_sent)
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/4426#pullrequestreview-548865398

---

From: Jana Iyengar <[email-masked]>
Date: Wed, 09 Dec 2020 21:51:56 -0800

b703481109f92b73fda3bdff5e9afce387890452  Update draft-ietf-quic-recovery.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/4426/files/6d29ee6c5b1afbfaac3c29b5c4ce8d2020679767..b703481109f92b73fda3bdff5e9afce387890452

---

From: Jana Iyengar <[email-masked]>
Date: Wed, 09 Dec 2020 21:56:18 -0800

for lost_packet in lost_packets:
-    assert(lost_packet.in_flight)
-    bytes_in_flight -= lost_packet.sent_bytes
-  OnCongestionEvent(lost_packets.largest().time_sent)
+    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)
+  // Congestion event if any in-flight packets were lost 

```suggestion
  // Congestion event if in-flight packets were lost
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/4426#pullrequestreview-548871685

---

From: Jana Iyengar <[email-masked]>
Date: Wed, 09 Dec 2020 21:56:26 -0800

b3168ac6b9fb9580ff105b22b84be9cba4f81d02  Update draft-ietf-quic-recovery.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/4426/files/b703481109f92b73fda3bdff5e9afce387890452..b3168ac6b9fb9580ff105b22b84be9cba4f81d02

---

From: Jana Iyengar <[email-masked]>
Date: Wed, 09 Dec 2020 21:58:55 -0800

@janaiyengar approved this pull request.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/4426#pullrequestreview-548875198

---

From: Jana Iyengar <[email-masked]>
Date: Wed, 09 Dec 2020 21:59:31 -0800

Merged #4426 into master.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/4426#event-4093318131