Subject: [quicwg/base-drafts] Loss-detection happens after CC-increase, leading to higher congestion window (#3495)

From: Christoph Paasch <[email-masked]>
Date: Tue, 03 Mar 2020 14:10:51 -0800

In the pseudo-code in appendix A.6, the call to ```DetectLostPackets``` is after ```OnPacketAcked```, while the call to ```ProcessECN``` is before that:

```
  // Process ECN information if present.
  if (ACK frame contains ECN information):
      ProcessECN(ack, pn_space)

  for acked_packet in newly_acked_packets:
    OnPacketAcked(acked_packet.packet_number, pn_space)

  DetectLostPackets(pn_space)
```

This means that if I get an ACK while in slow-start that indicates a packet-loss, the stack will first call ```OnPacketAcked``` (which ends up increasing the congestion-window) and only later enter recovery through ```DetectLostPackets```. Meaning, the congestion-window will actually be bigger than the flight-size that caused the packet-loss.

E.g., if cwnd is 10 while in slow-start and 10 packets were sent. If I get an ACK for 9 packets, indicating a hole, the congestion-window will first increase to 19 and then enter congestion-avoidance and reduce the congestion-window to 13 (assuming Cubic). Thus, the congestion-window is effectively bigger than 10 while it should be smaller than 10 (the flight-size that caused the packet-loss).

Shouldn't we process the loss before ```OnPacketAcked```, the same way ECN is being processed before that?

-- 
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/issues/3495

---

From: ianswett <[email-masked]>
Date: Tue, 03 Mar 2020 15:37:28 -0800

Thanks for filing, pseudocode is editorial.

-- 
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/issues/3495#issuecomment-594227258

---

From: Christoph Paasch <[email-masked]>
Date: Wed, 04 Mar 2020 10:39:16 -0800

To add to this, this is even more-so true when implementing congestion-window validation. For Section 4.4.1 of RFC7661, one needs an estimate of the flight-size at the time of the loss-event. If we process ACKs before the loss-indication, we will have "lost" the flight-size information.

-- 
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/issues/3495#issuecomment-594738617

---

From: ianswett <[email-masked]>
Date: Fri, 27 Mar 2020 09:04:19 -0700

@cpaasch PTAL at #3450 if you have time.

-- 
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/issues/3495#issuecomment-605082283

---

From: Christoph Paasch <[email-masked]>
Date: Fri, 27 Mar 2020 09:26:41 -0700

@ianswett - Thanks! Looks good to me.

-- 
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/issues/3495#issuecomment-605094003

---

From: ianswett <[email-masked]>
Date: Tue, 31 Mar 2020 17:07:34 -0700

Closed #3495 via #3540.

-- 
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/issues/3495#event-3185633745