[quicwg/base-drafts] 110200: Refactor DetectLostPackets

Martin Thomson <martin.thomson@gmail.com> Thu, 29 November 2018 00:42 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 9A809130E25 for <quic-issues@ietfa.amsl.com>; Wed, 28 Nov 2018 16:42:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.748
X-Spam-Level:
X-Spam-Status: No, score=-0.748 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] 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 AKB0iZ3NH4aZ for <quic-issues@ietfa.amsl.com>; Wed, 28 Nov 2018 16:42:36 -0800 (PST)
Received: from m69-169.mailgun.net (m69-169.mailgun.net [166.78.69.169]) (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 1DD3B130DD7 for <quic-issues@ietf.org>; Wed, 28 Nov 2018 16:42:35 -0800 (PST)
DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=github.com; q=dns/txt; s=mailo; t=1543452155; h=Content-Transfer-Encoding: Content-Type: Mime-Version: Subject: Message-ID: To: Reply-To: From: Date: Sender; bh=lwtv5npy2do6OHyoXCKPJTJny1xttNvjBlWfh9nQpDU=; b=WXfmWHrehXdA4S0XOqG2neF5K59Pos8mbloQ+91RuPoKnuU+IiDNztSFvz40mx2DUxES0o8Y DZrDAEykog3zLYQBFtjTQJr96O0lBpGD0Hi6szviapCnXBdGbi3iRQqXEqR/eLhw6y4Vk4hs iZ3N4eyqHmB3EIN6SGCJXCf0v2g=
X-Mailgun-Sending-Ip: 166.78.69.169
X-Mailgun-Sid: WyJhNzYyYiIsICJxdWljLWlzc3Vlc0BpZXRmLm9yZyIsICI0MGYiXQ==
Sender: martin.thomson=gmail.com@github.com
Received: from github.com (Unknown [192.30.252.34]) by mxa.mailgun.org with ESMTP id 5bff35f9.7fa91ab1b5a0-smtp-out-n01; Thu, 29 Nov 2018 00:42:33 -0000 (UTC)
Date: Wed, 28 Nov 2018 16:42:32 -0800
From: Martin Thomson <martin.thomson@gmail.com>
Reply-To: Martin Thomson <martin.thomson@gmail.com>
To: quic-issues@ietf.org
Message-ID: <5bff35f891071_4a0d2ab3c868a57822380@hookshot-fe-7191cb1.cp1-iad.github.net.mail>
Subject: [quicwg/base-drafts] 110200: Refactor DetectLostPackets
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="--==_mimepart_5bff35f890b74_4a0d2ab3c868a578222fc"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/cHD3TnRr_Bh_TNPaupC8etkem_4>
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, 29 Nov 2018 00:42:38 -0000

  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 <martin.thomson@gmail.com>
  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.