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

ianswett <> Tue, 02 April 2019 21:54 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id D68D112033C for <>; Tue, 2 Apr 2019 14:54:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -3.001
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: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 3DPKZIq7Ll5z for <>; Tue, 2 Apr 2019 14:54:51 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id A6D59120326 for <>; Tue, 2 Apr 2019 14:54:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed;; 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 with SMTP id filter0385p1iad2-21565-5CA3DA2A-1C 2019-04-02 21:54:50.696982843 +0000 UTC m=+452987.006104642
Received: from (unknown []) by (SG) with ESMTP id bisKModnQ_aD0pF5SI08SA for <>; Tue, 02 Apr 2019 21:54:50.739 +0000 (UTC)
Received: from (localhost []) by (Postfix) with ESMTP id B32DC260A4E for <>; Tue, 2 Apr 2019 14:54:50 -0700 (PDT)
Date: Tue, 02 Apr 2019 21:54:50 +0000
From: ianswett <>
Reply-To: quicwg/base-drafts <>
To: quicwg/base-drafts <>
Cc: Subscribed <>
Message-ID: <quicwg/base-drafts/pull/2281/review/>
In-Reply-To: <quicwg/base-drafts/pull/>
References: <quicwg/base-drafts/pull/>
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-SG-EID: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak05OxEYbPbNZ+MYxZmk9soAoM8Zr9WzEoi0yL 7FmP7DZ9q9G0uOC/wMZFDfNOCPfGjQReYCZDD8haLxaceJwbO9sHegF3dMVZ/wPpbtiRqS9dNavlVG DWi6q+FE+8TyQrupAEXJI3mGSCxwznk67ahrTFKReCAJIQT4YKu+7SoIHeeaB6GJnO1g9LmQRiGBVa U=
Archived-At: <>
X-Mailman-Version: 2.1.29
List-Id: Notification list for GitHub issues related to the QUIC WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-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
+  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.
+  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.
+  else if (endpoint is client without 1-RTT keys):
+    if (will send Initial packet):

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

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub: