Subject: [quicwg/base-drafts] f14448: Fix the AllPacketsLost thing too

From: Martin Thomson <[email-masked]>
Date: Tue, 18 Aug 2020 17:57:00 -0700

Branch: refs/heads/pc-starts-now
  Home:   https://github.com/quicwg/base-drafts
  Commit: f14448146246f4296e9853f0969aaae7279f3c6c
      https://github.com/quicwg/base-drafts/commit/f14448146246f4296e9853f0969aaae7279f3c6c
  Author: Martin Thomson <[email-masked]>
  Date:   2020-08-19 (Wed, 19 Aug 2020)

  Changed paths:
    M draft-ietf-quic-recovery.md

  Log Message:
  -----------
  Fix the AllPacketsLost thing too

This turned out to be really tricky.  There is still a "cheat" here in a
function I called `FindLargestContiguousLoss`, which requires comments.

I did manage to address the problem of doing this across packet number
spaces by introducing a global variable.  That variable now collects all
lost packets into a single place.

However, doing that means that you need to clear it out occasionally, or
you declare persistent congestion all the time.  This only clears it out
each time you declare persistent congestion, which is massively
inefficient.  I hope people realize that, but it didn't seem
appropriate as the best fix I could come up with requires breaking down
the clean separation of congestion control and loss recovery parts.

(That fix is to reset this persistent congestion collection if the
largest acknowledged increases, but after running the persistent
congestion check.  That requires that the loss recovery code
and congestion control code be interleaved in awkward ways.  Maybe there
is a simpler approach, but I can't think of one right now.)

cc @ianswett, @janaiyengar