Re: [quicwg/base-drafts] Include handshake anti-deadlock logic in pseudocode (#2281)

ianswett <notifications@github.com> Tue, 02 April 2019 21:54 UTC

Return-Path: <bounces+848413-a050-quic-issues=ietf.org@sgmail.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 D68D112033C for <quic-issues@ietfa.amsl.com>; Tue, 2 Apr 2019 14:54:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.001
X-Spam-Level:
X-Spam-Status: No, score=-3.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_NONE=-0.0001, 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 3DPKZIq7Ll5z for <quic-issues@ietfa.amsl.com>; Tue, 2 Apr 2019 14:54:51 -0700 (PDT)
Received: from o9.sgmail.github.com (o9.sgmail.github.com [167.89.101.2]) (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 A6D59120326 for <quic-issues@ietf.org>; Tue, 2 Apr 2019 14:54:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com; h=from:reply-to:to:cc:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe; s=s20150108; bh=hZkD5V30N0W2pzoRB2z1VocYCf8=; b=uRC8gF2e05TAXrgq D7urZ54EJcJ6X/ios/s6tJIH/lvQARHuOMF6r6XiLkR1tLNRzrApqqGWapzklQnV flJ4hDYGcTTNms8aPdmBhFEOWhjzoSQ2DWyhNzP0SoBWZ6Wi+bjruG2K7APzhQvy UleXmCRKQVozIjYJz12kWFs0DYo=
Received: by filter0385p1iad2.sendgrid.net with SMTP id filter0385p1iad2-21565-5CA3DA2A-1C 2019-04-02 21:54:50.696982843 +0000 UTC m=+452987.006104642
Received: from github-lowworker-dc5ea3e.cp1-iad.github.net (unknown [192.30.252.45]) by ismtpd0030p1iad2.sendgrid.net (SG) with ESMTP id bisKModnQ_aD0pF5SI08SA for <quic-issues@ietf.org>; Tue, 02 Apr 2019 21:54:50.739 +0000 (UTC)
Received: from github.com (localhost [127.0.0.1]) by github-lowworker-dc5ea3e.cp1-iad.github.net (Postfix) with ESMTP id B32DC260A4E for <quic-issues@ietf.org>; Tue, 2 Apr 2019 14:54:50 -0700 (PDT)
Date: Tue, 02 Apr 2019 21:54:50 +0000
From: ianswett <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4aba683dbb92ecf315be982339a3f56c41193c7da5f92cf0000000118bb9c2a92a169ce178befb2@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/2281/review/221761780@github.com>
In-Reply-To: <quicwg/base-drafts/pull/2281@github.com>
References: <quicwg/base-drafts/pull/2281@github.com>
Subject: Re: [quicwg/base-drafts] Include handshake anti-deadlock logic in pseudocode (#2281)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5ca3da2ab0cf6_1d773fd409ed45b411043c"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: ianswett
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
X-SG-EID: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak05OxEYbPbNZ+MYxZmk9soAoM8Zr9WzEoi0yL 7FmP7DZ9q9G0uOC/wMZFDfNOCPfGjQReYCZDD8haLxaceJwbO9sHegF3dMVZ/wPpbtiRqS9dNavlVG DWi6q+FE+8TyQrupAEXJI3mGSCxwznk67ahrTFKReCAJIQT4YKu+7SoIHeeaB6GJnO1g9LmQRiGBVa U=
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/RxjUU_3j4LU0bfdDsfOhiLzWfZo>
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, 02 Apr 2019 21:54:54 -0000

ianswett commented on this pull request.

Thanks for fixing this.  Because of the deadlock prevention, this is definitely a trick to get right.

It'd be nice to use the "handshake complete" concept in recovery, but defining it may be more work than it's worth.

> @@ -1078,6 +1078,19 @@ GetEarliestLossTime():
   return time, space
 
 SetLossDetectionTimer():
+  if (crypto packets are in flight

Two suggestions: 
1) If loss_time is non-zero, it will be earlier than the crypto retransmission timer, so it's important to check that first.

2) The check for ack-eliciting packets can be moved right in front of the PTO timer.

>      // Crypto retransmission timeout.
     RetransmitUnackedCryptoData()
     crypto_count++
+  else if (endpoint is client without 1-RTT keys):
+    if (will send Initial packet):
+       SendOnePaddedPacket()
+     else:
+       SendOnePacket()
+    crypto_count++
+  else if (loss_time != 0):

Time threshold loss detection should still be before the crypto case.

>      // Crypto retransmission timeout.
     RetransmitUnackedCryptoData()
     crypto_count++
+  else if (endpoint is client without 1-RTT keys):
+    if (will send Initial packet):

I'd say
"if (has Handshake keys):
  SendOneHandshakePacket()
 else
  SendOnePaddedInitialPacket()" 

-- 
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/2281#pullrequestreview-221761780