RE: Is CONNECTION_CLOSE frame Ack-eliciting?

Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com> Wed, 05 June 2019 14:07 UTC

Return-Path: <mikkelfj@gmail.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4188E1200B6 for <quic@ietfa.amsl.com>; Wed, 5 Jun 2019 07:07:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.007
X-Spam-Level:
X-Spam-Status: No, score=-0.007 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=1.989, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 v1GEN9LYNCzM for <quic@ietfa.amsl.com>; Wed, 5 Jun 2019 07:07:52 -0700 (PDT)
Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (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 E7611120048 for <quic@ietf.org>; Wed, 5 Jun 2019 07:07:51 -0700 (PDT)
Received: by mail-ed1-x52f.google.com with SMTP id h10so5938464edi.13 for <quic@ietf.org>; Wed, 05 Jun 2019 07:07:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=Jgm/NkYFPZzWHgYSf0iVFc/w7p1BDevnrC4krmkSW+M=; b=by1UfJPx6MXRNv8qWJQg0Np6KtXrqRYDvzJAETKdREy4UVCus0bzKXFzmwTeNog6aJ JV8rFJG2Ou96usOaaO1NL1IpUcqACp/29QYJ3vK/7trNK1DbRKBYq3miFqmJLXws5Uy0 UFsOlmLowNpRkoxAg+8qeoSf/GTSgeZkSNxckp0g5jpbjAIH+XW92ie9zZjuKHhmUrY8 LjZQdHytIBS4lIyJr9BgG4OdGwThQtzSV8swkxZWpajbdBbQwiGWrNDhovG1XVbnpBcx yLwngV8J3xE2ZrHxHnVyGRegn6wKM687L9VwDojK5bQuN6/bXpLm8kmY6D+XguK8hwkV 8t8g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=Jgm/NkYFPZzWHgYSf0iVFc/w7p1BDevnrC4krmkSW+M=; b=PiuJN/d035MEFskCZvZPTzXBEqK7YqMNhG2dQ9YnQ8FLwmqxV+9BZ5cMa9sQnBYekN 0ZrkM2mwmvDZfPFvAWwJDcorFTSjHmHyMzixFpMTtEZzyHvHvDwaFUQLCV5LT5M9xW7s gVKTkIrkRas8jPQi1Z84J4qw8gybz/fuNXS4D7x0viasZozRzYIr0WHVcac/WWIVPZS7 Y24XSL1n7tiaXOKUtX3twJ897h/ppFzQ3msTZpjCy7oue1LqN5Zbd6kM8bA5198zLNhU 9Wi9tUs+P1G14iZLuUX4klX3dnUm/4DFp6Xiu6l11QlZ1/Q9e6LvnJFwGRQD+YkE+xaj 2OzA==
X-Gm-Message-State: APjAAAXOeIgvFczYf1U9rLO76WqixLZ1KltnZ3szkrejdJ05vrLTBZWs 36z12gOXX5iVHTdK9IgBEkIZyJ3GFv2mtHp5FAE=
X-Google-Smtp-Source: APXvYqxBh1dz4o71sdSCwQ7MyXuefz+quSVaQ095gjlod+/5nhyzMeNAeg0/ljB6WllvscheZrwJL6zbBfRl+/1YYW0=
X-Received: by 2002:aa7:d6c8:: with SMTP id x8mr43478387edr.13.1559743670445; Wed, 05 Jun 2019 07:07:50 -0700 (PDT)
Received: from 1058052472880 named unknown by gmailapi.google.com with HTTPREST; Wed, 5 Jun 2019 07:07:49 -0700
From: Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>
In-Reply-To: <BL0PR2101MB10437A1A42141B3481712B95B3160@BL0PR2101MB1043.namprd21.prod.outlook.com>
References: <CAG9+TpaByVDQZujwtRo9LHcqFn2cOxmy09y-JmVOAzMVroagVw@mail.gmail.com> <CAKcm_gO7A8gq7a234D8DF-yAre-7_rubJsn10bPXsS6eQPW5zg@mail.gmail.com> <BL0PR2101MB10437A1A42141B3481712B95B3160@BL0PR2101MB1043.namprd21.prod.outlook.com>
X-Mailer: Airmail (420)
MIME-Version: 1.0
Date: Wed, 05 Jun 2019 07:07:49 -0700
Message-ID: <CAN1APdfvQ9iewtPz0GBvyONaHfBNpyp28Q4rY97=o6ranmGD2g@mail.gmail.com>
Subject: RE: Is CONNECTION_CLOSE frame Ack-eliciting?
To: Ian Swett <ianswett=40google.com@dmarc.ietf.org>, Nick Banks <nibanks=40microsoft.com@dmarc.ietf.org>, Jiuhai Zhang <jiuhai.zhang@gmail.com>
Cc: IETF QUIC WG <quic@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000006aedd0058a941f16"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/NfCaoLiUvEI-356UEDSZ_6xyyuk>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 05 Jun 2019 14:07:55 -0000

CONNECTION_CLOSE can be response to CONNECTION_CLOSE and that response can
contain other frames. So technically you can ACK a connection close.

Doing so might actually make sense if the original closer take that as a
signal to drain faster.


On 5 June 2019 at 16.00.16, Nick Banks (
nibanks=40microsoft.com@dmarc.ietf.org) wrote:

Ian,



I have encountered issues both in local automated tests and during interop,
where one side gets everything it wants and then cleanly closes the
connection. The issues arise because the peer hasn’t received the ACK for
that last exchange. For that reason, winquic always encodes its latest ACK
state with (always frames before) the CONNECTION_CLOSE frame. This doesn’t
increase the size of the packet much, and it’s up to the receiver if they
want to process the ACKs or not; but it helps these kind of scenarios.



A simple example test case:



Client: Open one bidirectional stream, send data on it, FIN it, and verify
the peer does the same. Then close the connection.

Server: Accept one bidirectional stream, receive all data on it and echo it
back. Verify all data is sent successfully.



The “Verify all data is sent successfully” fails if you don’t send ACKs
with CONNECTION_CLOSE. So, I personally think it’s a good idea to recommend
including ACKs. I know it doesn’t provide any guarantees in the presence of
packet loss, so ideally you don’t design an app protocol on top of this,
but it does make things a little nicer, IMO.



Thank,

- Nick



*From:* QUIC <quic-bounces@ietf.org> *On Behalf Of * Ian Swett
*Sent:* Wednesday, June 5, 2019 6:48 AM
*To:* Jiuhai Zhang <jiuhai.zhang@gmail.com>
*Cc:* IETF QUIC WG <quic@ietf.org>
*Subject:* Re: Is CONNECTION_CLOSE frame Ack-eliciting?



Technically, yes.  But connections don't send any packets after processing
a CONNECTION_CLOSE frame, so you would never receive and ACK for it.



From: https://tools.ietf..org/html/draft-ietf-quic-transport-20#section-10.1
<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Fdraft-ietf-quic-transport-20%23section-10.1&data=02%7C01%7Cnibanks%40microsoft.com%7Ca3e4b3be88064c15350408d6e9bc9185%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636953393451363725&sdata=bi9%2FDh3XZuUgM%2B23tC54csAhdE5RQENRTQzgj5%2B%2BPlM%3D&reserved=0>

"The draining state is entered once an endpoint receives a signal that

   its peer is closing or draining.  While otherwise identical to the
   closing state, an endpoint in the draining state MUST NOT send any
   packets.  Retaining packet protection keys is unnecessary once a
   connection is in the draining state."



On Wed, Jun 5, 2019 at 8:04 AM Jiuhai Zhang <jiuhai.zhang@gmail.com> wrote:

In https://tools.ietf.org/html/draft-ietf-quic-recovery-20#section-2
<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Fdraft-ietf-quic-recovery-20%23section-2&data=02%7C01%7Cnibanks%40microsoft.com%7Ca3e4b3be88064c15350408d6e9bc9185%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636953393451363725&sdata=420rgTO4Iud8HbpF8KvvANjFfPFP%2BtwAnjVS7KszGb4%3D&reserved=0>

Ack-eliciting Frames:  All frames besides ACK or PADDING are

      considered ack-eliciting.



Is CONNECTION_CLOSE frame Ack-eliciting?

Should endpoint responds a ACK frame when receiving a CONNECTION_CLOSE frame?