[quicwg/base-drafts] 587f8a: Refactor DetectLostPackets

Jana Iyengar <jri.ietf@gmail.com> Thu, 06 December 2018 01:53 UTC

Return-Path: <bounce+565321.40f-quic-issues=ietf.org@github.com>
X-Original-To: quic-issues@ietfa.amsl.com
Delivered-To: quic-issues@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9E6EE130DCB for <quic-issues@ietfa.amsl.com>; Wed, 5 Dec 2018 17:53:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.747
X-Spam-Level:
X-Spam-Status: No, score=-0.747 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, NML_ADSP_CUSTOM_MED=0.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=github.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xxzkCg-maaGq for <quic-issues@ietfa.amsl.com>; Wed, 5 Dec 2018 17:53:52 -0800 (PST)
Received: from m69-170.mailgun.net (m69-170.mailgun.net [166.78.69.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0E827128DFD for <quic-issues@ietf.org>; Wed, 5 Dec 2018 17:53:51 -0800 (PST)
DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=github.com; q=dns/txt; s=mailo; t=1544061231; h=Content-Transfer-Encoding: Content-Type: Mime-Version: Subject: Message-ID: To: Reply-To: From: Date: Sender; bh=xrbeU713MdgpKLu6zRPqj7FGkSZTwICs8wqYJ7icaUo=; b=Ls6oyVPm5dPI9ZiChTRPemh5PhS19adL30WdMOAt+HnDTMANytR8EIiOL58zUucUpvZ36BrY FzUHrOugUO91RR+BcZUq4OqzOfZU9VUU3h9sz8MgWpXaFic8mQP4uYnD3UofSSw74rRL7gGM 6vGY07C2/6VWXRbvINBoZj8MbiQ=
X-Mailgun-Sending-Ip: 166.78.69.170
X-Mailgun-Sid: WyJhNzYyYiIsICJxdWljLWlzc3Vlc0BpZXRmLm9yZyIsICI0MGYiXQ==
Sender: jri.ietf=gmail.com@github.com
Received: from github.com (Unknown [192.30.252.34]) by mxa.mailgun.org with ESMTP id 5c08812e.7f3c0b5291b0-smtp-out-n02; Thu, 06 Dec 2018 01:53:50 -0000 (UTC)
Date: Wed, 05 Dec 2018 17:53:49 -0800
From: Jana Iyengar <jri.ietf@gmail.com>
Reply-To: Jana Iyengar <jri.ietf@gmail.com>
To: quic-issues@ietf.org
Message-ID: <5c08812d36b17_38c32af3eb95657812159@hookshot-fe-88eb02d.cp1-iad.github.net.mail>
Subject: [quicwg/base-drafts] 587f8a: Refactor DetectLostPackets
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="--==_mimepart_5c08812d36724_38c32af3eb956578120c2"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/o6ShU493lAcK4Is3K86GIn5R5vs>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic-issues/>
List-Post: <mailto:quic-issues@ietf.org>
List-Help: <mailto:quic-issues-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 06 Dec 2018 01:53:57 -0000

  Branch: refs/heads/refactor-loss_time
  Home:   https://github.com/quicwg/base-drafts
  Commit: 587f8a5b72824b73b0543a33841a6437ceb0b981
      https://github.com/quicwg/base-drafts/commit/587f8a5b72824b73b0543a33841a6437ceb0b981
  Author: Martin Thomson <martin.thomson@gmail.com>
  Date:   2018-12-05 (Wed, 05 Dec 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?


  Commit: 29f5fdf72186f71d0d34d487dac8b18a30584e13
      https://github.com/quicwg/base-drafts/commit/29f5fdf72186f71d0d34d487dac8b18a30584e13
  Author: Martin Thomson <martin.thomson@gmail.com>
  Date:   2018-12-05 (Wed, 05 Dec 2018)

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

  Log Message:
  -----------
  Review changes


  Commit: db6929a33d31de152198f6560aad31a0ed53f359
      https://github.com/quicwg/base-drafts/commit/db6929a33d31de152198f6560aad31a0ed53f359
  Author: Martin Thomson <martin.thomson@gmail.com>
  Date:   2018-12-05 (Wed, 05 Dec 2018)

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

  Log Message:
  -----------
  Use <= for cutoffs


  Commit: 02a164ee1e8e208e414896124c15c627f79dcea8
      https://github.com/quicwg/base-drafts/commit/02a164ee1e8e208e414896124c15c627f79dcea8
  Author: Jana Iyengar <jri.ietf@gmail.com>
  Date:   2018-12-05 (Wed, 05 Dec 2018)

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

  Log Message:
  -----------
  Fixes some broken bits


Compare: https://github.com/quicwg/base-drafts/compare/d183b1e14b70...02a164ee1e8e
      **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.