Re: [quicwg/base-drafts] Add a loss_time per packet number space (#2451)

Marten Seemann <notifications@github.com> Tue, 12 February 2019 01:29 UTC

Return-Path: <noreply@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 A3B3812958B for <quic-issues@ietfa.amsl.com>; Mon, 11 Feb 2019 17:29:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.001
X-Spam-Level:
X-Spam-Status: No, score=-8.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001] autolearn=ham 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 cVDmR1qyni77 for <quic-issues@ietfa.amsl.com>; Mon, 11 Feb 2019 17:29:57 -0800 (PST)
Received: from out-5.smtp.github.com (out-5.smtp.github.com [192.30.252.196]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E9A8A12941A for <quic-issues@ietf.org>; Mon, 11 Feb 2019 17:29:56 -0800 (PST)
Date: Mon, 11 Feb 2019 17:29:56 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1549934996; bh=MXFEZxAWR3TchEqwfRdJyUV0eH0/PGzW6eJiYy3dUto=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=JdYBlldCsdqSg2jQxgsFMBVUsD/V0GVTf55PHab4ysStkcJY+E3q4jR/6ySS5uoqO Y0P0FACdPift8Moi/1C0IB/ru+Fkvy0v5fd/6Iwp9ecPpjPpFK/VwTR8LwzUscUGnj 8BYw+1j4lYbV4WQ7j6uQt79ZAAXu1Qh8kYmTBa8o=
From: Marten Seemann <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4ab3695a03dc3bb7ab051f8c059564057c56970cbd192cf000000011879e39492a169ce185e5d21@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/2451/review/202436241@github.com>
In-Reply-To: <quicwg/base-drafts/pull/2451@github.com>
References: <quicwg/base-drafts/pull/2451@github.com>
Subject: Re: [quicwg/base-drafts] Add a loss_time per packet number space (#2451)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5c622194783e_3bb63fa45fcd45b8173742"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: marten-seemann
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/blFxgfecPQO6-hlBt1akVffTTIs>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.29
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: Tue, 12 Feb 2019 01:29:59 -0000

marten-seemann commented on this pull request.

It's a big annoying that we need the `GetEarliestLossTime()` function for something that trivial.
If we initialize the loss times to infinity, taking the minimum would become more straightforward, but we'd still need some code to tell which packet number space the chosen time comes from, so I'm not sure if this change would really help.

> @@ -1022,13 +1021,31 @@ timers wake up late. Timers set in the past SHOULD fire immediately.
 Pseudocode for SetLossDetectionTimer follows:
 
 ~~~
+// Returns the earliest loss_time and the packet number
+// space it's from.  Returns 0 if all times are 0.
+GetEarliestLossTime():
+  time = loss_time[Initial]
+  space = Initial
+  for pn_space in [ Handshake, ApplicatonData ]:
+    if loss_time[pn_space] != 0 &&
+       (time == 0 || loss_time[pn_space] < time):
+      time = loss_time[pn_space];
+      space = Initial

`space = pn_space`

>  SetLossDetectionTimer():
   // Don't arm timer if there are no ack-eliciting packets
   // in flight.
   if (no ack-eliciting packets in flight):
     loss_detection_timer.cancel()
     return
 
+  [loss_time, pn_space] = GetEarliestLossTime()

In Python, you don't need square brackets to receive multiple return values.

And since we're not using the the `pn_space` here, we could write: `loss_time, _ = GetEarliestLossTime()`

> @@ -1067,14 +1078,15 @@ Pseudocode for OnLossDetectionTimeout follows:
 
 ~~~
 OnLossDetectionTimeout():
-  if (crypto packets are in flight):
+  [loss_time, pn_space] = GetEarliestLossTime()

Same here.

> @@ -1067,14 +1078,15 @@ Pseudocode for OnLossDetectionTimeout follows:
 
 ~~~
 OnLossDetectionTimeout():
-  if (crypto packets are in flight):
+  [loss_time, pn_space] = GetEarliestLossTime()
+  if (loss_time != 0):
+    // Time threshold loss Detection
+    DetectLostPackets(pn_space)
+  // Don't retransmit all crypto data if a packet was just lost.

This comment only makes sense for someone who followed the evolution of this algorithm. We should instead have a comment that describes when to retransmit all crypto data.

-- 
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/pull/2451#pullrequestreview-202436241