Subject: [quicwg/base-drafts] 110200: Refactor DetectLostPackets
From: Martin Thomson <[email-masked]>
To: [email-masked]
Date: Wed, 28 Nov 2018 16:42:32 -0800
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>

Branch: refs/heads/refactor-loss_time
  Home:   https://github.com/quicwg/base-drafts
  Commit: 1102009604f82c55fc2d279a6696393a03a7a11e
      https://github.com/quicwg/base-drafts/commit/1102009604f82c55fc2d279a6696393a03a7a11e
  Author: Martin Thomson <[email-masked]>
  Date:   2018-11-29 (Thu, 29 Nov 2018)

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

  Log Message:
  -----------
  Refactor DetectLostPackets

This had a couple of problems that I think this addresses, and some that
it doesn't.

The first is that it isn't clear what is being iterated over and in what
order.  I think that the point here is to iterate over sent_packets,
starting with the oldest.  Correct me if that is wrong.  In any case,
this change doesn't assume an iteration order.  The only reason the
iteration order is important is in setting loss_time, which needs to be
the earliest time (assuming that I'm right).

This simplifies the function, by setting thresholds at the top and doing
a simple comparison.

I've added a note about loss_time potentially being in the past.

The problem that remains is that this appeared to iterate only over
packets that have a packet number less than the largest acknowledged.
I've added that condition to the loop, but I don't think that it's
right.  I think that it's just redundant - and while an implementation
might stop its iteration at the largest acknowledged to save cycles,
this function will operate the same without the extra check.

It's also not clear whether the greater than comparisons here were
correct.  If you assume that firing of the timer cannot take zero time,
this is never an issue, but with discrete intervals on time values,
that's not always going to happen.  As setup, this code could be called
at exactly loss_time for a packet, in which case that packet will not be
declared lost.  I think that this wants >= in the time comparison for
that reason.

Finally, should the early retransmit timer be configurable?  Should it
be set based on kTimeReorderingThreshold?

      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.