Re: [quicwg/base-drafts] Split error code space (#722)
janaiyengar <notifications@github.com> Tue, 15 August 2017 00:04 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 E2E8F132455 for <quic-issues@ietfa.amsl.com>; Mon, 14 Aug 2017 17:04:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.799
X-Spam-Level:
X-Spam-Status: No, score=-4.799 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-2.8, SPF_PASS=-0.001, URIBL_BLOCKED=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 doKxNExW_k5z for <quic-issues@ietfa.amsl.com>; Mon, 14 Aug 2017 17:04:23 -0700 (PDT)
Received: from o6.sgmail.github.com (o6.sgmail.github.com [192.254.113.101]) (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 8F525132453 for <quic-issues@ietf.org>; Mon, 14 Aug 2017 17:04:22 -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=j0sgGo50xf4V3WT35ypRp67Wu/g=; b=iNNqmGUhdhJcbEGt ayIhXi6oXTV+PE+bGYsTuQA5xueYNzGis/kdYh9a5BvixOPV7/526icnj0zs4FST jOJYNfrOKirjdtki5y4KY2kmyAuMupv1dG9jQgnyM9N+cibdwe7/pKSZk6+PGgIi kJpkyQum8q6Cyw5Asyn/JKOeMX4=
Received: by filter0817p1mdw1.sendgrid.net with SMTP id filter0817p1mdw1-7970-59923A1F-1 2017-08-15 00:02:39.005299132 +0000 UTC
Received: from github-smtp2b-ext-cp1-prd.iad.github.net (github-smtp2b-ext-cp1-prd.iad.github.net [192.30.253.17]) by ismtpd0040p1mdw1.sendgrid.net (SG) with ESMTP id E5NlQPzWTzOQ_T9g2XI45w for <quic-issues@ietf.org>; Tue, 15 Aug 2017 00:02:38.883 +0000 (UTC)
Date: Tue, 15 Aug 2017 00:02:39 +0000
From: janaiyengar <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4ab5721c1b8c75c10fb81aaefa48b6ef2fb2812064192cf0000000115a9fc1e92a169ce0edfabce@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/722/review/56230010@github.com>
In-Reply-To: <quicwg/base-drafts/pull/722@github.com>
References: <quicwg/base-drafts/pull/722@github.com>
Subject: Re: [quicwg/base-drafts] Split error code space (#722)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_59923a1e92bba_48aa3f87c68e5c3c1199ec"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: janaiyengar
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: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak0AUlBBpFUXIHlyGKmMNDt69qBmdRMT1NiPoe rK1EIXU3zBkcPTZHcEqAbK8siue5jnDVU4k7+/CRcWTv+GK3/hQHxNz6G+dP58f7hbm+kFg208lTXb P16ULkA5kZeBtltF6RxvoEX1qsxtXmxwSM4PUpPDPqWQDJkTTILjeCiBIgLZcP29Wsl7rcAR3R60+O 4=
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/Yf1AK9tgh16j-K2A7VpYU-jYud8>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.22
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, 15 Aug 2017 00:04:26 -0000
janaiyengar commented on this pull request.
Comments inline. Can you also please not stack these PRs? Github is really difficult to use for review of large changes like this one, and stacking PRs makes it even harder. I understand the pains of merge conflicts, but honestly, that's a one-time pain during merge, not a continual pain during review.
>
-The portion of the QUIC error code space allocated for the crypto handshake is
-0xC0000000-0xFFFFFFFF. The following error codes are defined when TLS is used
-for the crypto handshake:
+This document defines error codes from the error code space used in
+{{QUIC-TRANSPORT}}.
This document --> This section.
Also, editorial nit: I like the mention of "crypto handshake when TLS is used for it".
>
Error Code:
: A 32-bit error code which indicates the reason for closing this connection.
+ TRANSPORT_CLOSE uses codes from the space defined in {{error-codes}};
+ APPLICATION_CLOSE uses codes from the application protocol error code space
+ ({{app-error-codes}}).
Seems unnecessary to mention APPLICATION_CLOSE in the definitoion of TRANSPORT_CLOSE.
> @@ -2608,11 +2654,10 @@ discarded upon receipt. This avoids potential ambiguity about which STREAM
frames count toward flow control.
Upon receipt of a STOP_SENDING frame on a stream in the "open" or "half-closed
-(remote)" states, an endpoint MUST send a RST_STREAM with an error code of
-QUIC_RECEIVED_RST. If the STOP_SENDING frame is received on a stream that is
-already in the "half-closed (local)" or "closed" states, a RST_STREAM frame MAY
-still be sent in order to cancel retransmission of previously-sent STREAM
-frames.
+(remote)" states, an endpoint MUST send a RST_STREAM frame. If the STOP_SENDING
What's the proposed error code in the RST_STREAM now? If there's a requirement for QUIC to generate and send this frame, the error code has to be specified.
>
-An endpoint that receives an invalid CONNECTION_CLOSE frame MUST NOT signal the
-existence of the error to its peer.
+An endpoint that chooses not to retransmit packets containing TRANSPORT_CLOSE or
+APPLICATION_CLOSE risks a peer missing the first such packet. The only
+mechanism available to an endpoint that continues to receive data for a
+terminated connection is to use the stateless reset process
+({{stateless-reset}}).
editorial nit: I would merge this para with the one above, since this one follows from the earlier.
>
-An endpoint that receives an invalid CONNECTION_CLOSE frame MUST NOT signal the
-existence of the error to its peer.
+An endpoint that chooses not to retransmit packets containing TRANSPORT_CLOSE or
+APPLICATION_CLOSE risks a peer missing the first such packet. The only
Not just the first packet, but any packets lost in the network.
> @@ -2923,115 +2975,102 @@ Stream 0 is critical to the functioning of the entire connection. If stream 0
is closed with either a RST_STREAM or STREAM frame bearing the FIN flag, an
endpoint MUST generate a connection error of type PROTOCOL_VIOLATION.
-Some application protocols make other streams critical to that protocol. An
-application protocol does not need to inform the transport that a stream is
-critical; it can instead generate appropriate errors in response to being
-notified that the critical stream is closed.
-
-An endpoint MAY send a RST_STREAM frame in the same packet as a CONNECTION_CLOSE
-frame.
-
-
-## Error Codes
+A stream error is always an application-layer construct. A RST_STREAM MUST NOT
I would drop this first sentence -- it's a bit imprecise and does not add value.
> -Some application protocols make other streams critical to that protocol. An
-application protocol does not need to inform the transport that a stream is
-critical; it can instead generate appropriate errors in response to being
-notified that the critical stream is closed.
-
-An endpoint MAY send a RST_STREAM frame in the same packet as a CONNECTION_CLOSE
-frame.
-
-
-## Error Codes
+A stream error is always an application-layer construct. A RST_STREAM MUST NOT
+be generated by the QUIC transport layer. Resetting a stream at the transport
+layer could cause unrecoverable loss of application protocol state. Application
+protocols might require certain streams to be reliably delivered in order to
+guarantee consistent state between endpoints. For this reason, all errors that
+can be detected at the transport layer result in connection errors.
This last sentence does not belong in this section, and is unnecessary. I would drop it.
>
-Error codes are 32 bits long, with the first two bits indicating the source of
-the error code:
+An endpoint that detects a stream error MAY choose to treat the error as a
+connection error and send an APPLICATION_CLOSE frame in place of RST_STREAM.
This is confusing. What is the "endpoint"? QUIC, or HTTP/QUIC? If QUIC is no longer generating RST_STREAM, then which stream errors are detected by QUIC? I suspect the answer is that the endpoint is HTTP/QUIC, in which case I would remove this sentence from here entirely.
>
: An endpoint detected an error in a specific frame type. The frame type is
included as the last octet of the error code. For example, an error in a
- MAX_STREAM_ID frame would be indicated with the code (0x80000106).
+ MAX_STREAM_ID frame would be indicated with the code (0x106).
+
+See {{iana-error-codes}} for details of registering new error codes.
+
+
+## Application Protocol Error Codes {#app-error-codes}
+
+Application protocol error codes are 32-bits long, but the management of
+application error codes are left to application protocols. Application protocol
+error codes are used for the RST_STREAM ({{frame-rst-stream}}) and
+APPLICATION_CLOSE ({{frame-application-close}}) frames.
+
+Application protocols SHOULD define an error codes for indicating no error and
typo: remove "an"
>
: An endpoint detected an error in a specific frame type. The frame type is
included as the last octet of the error code. For example, an error in a
- MAX_STREAM_ID frame would be indicated with the code (0x80000106).
+ MAX_STREAM_ID frame would be indicated with the code (0x106).
+
+See {{iana-error-codes}} for details of registering new error codes.
+
+
+## Application Protocol Error Codes {#app-error-codes}
+
+Application protocol error codes are 32-bits long, but the management of
16-bits
> @@ -1596,7 +1622,7 @@ The RST_STREAM frame is as follows:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream ID (32) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| Error Code (32) |
+| App Protocol Error Code (16) |
This is still 32 bits in this PR, right?
> @@ -2923,115 +2975,102 @@ Stream 0 is critical to the functioning of the entire connection. If stream 0
is closed with either a RST_STREAM or STREAM frame bearing the FIN flag, an
endpoint MUST generate a connection error of type PROTOCOL_VIOLATION.
-Some application protocols make other streams critical to that protocol. An
-application protocol does not need to inform the transport that a stream is
-critical; it can instead generate appropriate errors in response to being
-notified that the critical stream is closed.
-
-An endpoint MAY send a RST_STREAM frame in the same packet as a CONNECTION_CLOSE
-frame.
-
-
-## Error Codes
+A stream error is always an application-layer construct. A RST_STREAM MUST NOT
+be generated by the QUIC transport layer. Resetting a stream at the transport
drop "transport layer".
Also, it's odd to say QUIC MUST not generate a RST_STREAM, since it is a QUIC frame and QUIC does in fact generate it. How about "RST_STREAM MUST be instigated by the application and MUST carry an application error code."?
--
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/722#pullrequestreview-56230010
- [quicwg/base-drafts] Split error code space (#722) Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… janaiyengar
- Re: [quicwg/base-drafts] Split error code space (… Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… Mark Nottingham
- Re: [quicwg/base-drafts] Split error code space (… Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… janaiyengar
- Re: [quicwg/base-drafts] Split error code space (… Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… Mike Bishop
- Re: [quicwg/base-drafts] Split error code space (… Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… janaiyengar
- Re: [quicwg/base-drafts] Split error code space (… Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… janaiyengar
- Re: [quicwg/base-drafts] Split error code space (… Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… janaiyengar
- Re: [quicwg/base-drafts] Split error code space (… Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… Martin Thomson
- Re: [quicwg/base-drafts] Split error code space (… janaiyengar
- Re: [quicwg/base-drafts] Split error code space (… janaiyengar