Subject: [quicwg/base-drafts] Remove indent from all pseudocode (#4012)

From: Martin Thomson <[email-masked]>
Date: Mon, 17 Aug 2020 22:01:05 -0700

This wasn&#39;t consistent before.  Also, the extra indent made it really
hard to fit within the (paltry) line length limit for figures.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Remove indent from all pseudocode

-- File Changes --

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

-- Patch Links --

https://github.com/quicwg/base-drafts/pull/4012.patch
https://github.com/quicwg/base-drafts/pull/4012.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/4012

---

From: ianswett <[email-masked]>
Date: Tue, 18 Aug 2020 07:40:32 -0700

@ianswett approved this pull request.

LG, but I want to leave some of the empty lines.

> -
-    // Do not increase congestion window in recovery period.
-    if (InCongestionRecovery(acked_packet.time_sent)):
-      return
-
-    if (congestion_window < ssthresh):
-      // Slow start.
-      congestion_window += acked_packet.sent_bytes
-    else:
-      // Congestion avoidance.
-      congestion_window +=
-        max_datagram_size * acked_packet.sent_bytes
-        / congestion_window
+InCongestionRecovery(sent_time):
+  return sent_time <= congestion_recovery_start_time
+OnPacketsAcked(acked_packets):

These are different methods, so I'd like to keep a blank line between them.
```suggestion

OnPacketsAcked(acked_packets):
```

> -      return
-
-    if (congestion_window < ssthresh):
-      // Slow start.
-      congestion_window += acked_packet.sent_bytes
-    else:
-      // Congestion avoidance.
-      congestion_window +=
-        max_datagram_size * acked_packet.sent_bytes
-        / congestion_window
+InCongestionRecovery(sent_time):
+  return sent_time <= congestion_recovery_start_time
+OnPacketsAcked(acked_packets):
+  for acked_packet in acked_packets:
+    OnPacketAcked(acked_packet)
+OnPacketAcked(acked_packet):

```suggestion

OnPacketAcked(acked_packet):
```

> -     // Collapse congestion window if persistent congestion
-     if (InPersistentCongestion(lost_packets.largest())):
-       congestion_window = kMinimumWindow
+InPersistentCongestion(largest_lost):
+  // Persistent congestion cannot be declared on the
+  // first RTT sample.
+  if (is first RTT sample):
+    return false
+  pto = smoothed_rtt + max(4 * rttvar, kGranularity) +
+    max_ack_delay
+  congestion_period = pto * kPersistentCongestionThreshold
+  // Determine if all packets in the time period before the
+  // largest newly lost packet, including the edges and
+  // across all packet number spaces, are marked lost.
+  return AreAllPacketsLost(largest_lost, congestion_period)
+OnPacketsLost(lost_packets):

```suggestion

OnPacketsLost(lost_packets):
```

-- 
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/4012#pullrequestreview-469521930

---

From: Martin Thomson <[email-masked]>
Date: Tue, 18 Aug 2020 15:34:23 -0700

@martinthomson pushed 1 commit.

6e660ba5d10acfc45b7091fc072e589db03f9d5a  Restore line breaks

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

---

From: Martin Thomson <[email-masked]>
Date: Tue, 18 Aug 2020 15:34:45 -0700

Merged #4012 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/4012#event-3668366634

---

From: Jana Iyengar <[email-masked]>
Date: Tue, 18 Aug 2020 15:34:51 -0700

@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/4012#pullrequestreview-469875928