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 1E376130E3B
 for <quic-issues@ietfa.amsl.com>; Mon,  6 Aug 2018 07:00:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.01
X-Spam-Level: 
X-Spam-Status: No, score=-3.01 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, MAILING_LIST_MULTI=-1,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01]
 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 vQqv-EUMZUgy for <quic-issues@ietfa.amsl.com>;
 Mon,  6 Aug 2018 07:00:46 -0700 (PDT)
Received: from o4.sgmail.github.com (o4.sgmail.github.com [192.254.112.99])
 (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 CD7F2130E23
 for <quic-issues@ietf.org>; Mon,  6 Aug 2018 07:00:45 -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=teKgqIVkO8zujL6MyXHBl6tpLas=; b=O3t1/xeE3qwQ94WV
 9Mp5NcedfYaABuZh733ZWrvS6ZHzOhUObhqY9aTbKDUrRF0hS2ZXI5oQm9Ydt6KK
 8ES5FrQU2SIMpCT56HGVsdcXziHViDIm/90A75Id8g60cJig7NP2pxUiboY7TTZ3
 UTolNsw4zJejOXM9TvscL71Xpiw=
Received: by filter0951p1las1.sendgrid.net with SMTP id
 filter0951p1las1-25488-5B68548C-D
 2018-08-06 14:00:44.152517921 +0000 UTC m=+1006354.483803355
Received: from github-lowworker12-cp1-prd.iad.github.net (unknown
 [192.30.252.42])
 by ismtpd0023p1mdw1.sendgrid.net (SG) with ESMTP id eDOQfVccRzKuHZrDmVbEtQ
 for <quic-issues@ietf.org>; Mon, 06 Aug 2018 14:00:44.007 +0000 (UTC)
Received: from github.com (localhost [127.0.0.1])
 by github-lowworker12-cp1-prd.iad.github.net (Postfix) with ESMTP id
 965AF40D2F
 for <quic-issues@ietf.org>; Mon,  6 Aug 2018 07:00:43 -0700 (PDT)
Date: Mon, 06 Aug 2018 14:00:44 +0000 (UTC)
From: Dmitri Tikhonov <notifications@github.com>
Reply-To: quicwg/base-drafts
 <reply+0166e4ab64fe79c5fcfa1ef9a069b29784ce2f6d10ef3f5b92cf000000011780168b92a169ce13b52edd@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/issues/1432/410717845@github.com>
In-Reply-To: <quicwg/base-drafts/issues/1432@github.com>
References: <quicwg/base-drafts/issues/1432@github.com>
Subject: Re: [quicwg/base-drafts] Length-prefixes and flow control (#1432)
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="--==_mimepart_5b68548b946cf_2dde3fe6180be620600b9";
 charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: dtikhonov
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: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak2dcrzyOLIqT1GOoaLtxiWjlEMGtoM6JMT7Wh
 fBEoA1QraD2vka7RlE0KsBSKN7ucxSC88ZWZbld3Yd3RbKYGNZp+hECX1SbOtrRm7ompT3us9bQQHS
 ZKc+/I1pHoKmcn12RTmm7RS31UDdQGCYw2py2vYoet1mkBHYK1Q+EXn3hfN+U0Xyu5vCOXIfq/aYCq
 0=
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/lqW8ZV7T4h6luAjx-6vUX6JYWPU>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.27
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: Mon, 06 Aug 2018 14:00:49 -0000

----==_mimepart_5b68548b946cf_2dde3fe6180be620600b9
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

I'd like to make another comment related to the EOS symbol.  The QPACK encoding process produces two outputs: the encoder stream instructions and the header block.  Now that the encoder framing has been removed, the encoder instructions can be written directly to the stream, while the associated header block must be buffered because we don't know its length [1,2].

We can avoid buffering of the header block by introducing an _End of the Header Block_ instruction at the cost of one byte.  The header block has just a few instructions and can easily accommodate another one.  This would also force our hand with regard to the Base Index: we'd have to pick it immediately.  On the other hand, it can make the design simpler: just set it to the same value as the Largest Reference.  This will offset the cost of the new EOS instructions, as Base Reference no longer has to be transmitted.

For this to work, we'd have to bring back _CONTINUATION_ frames, which seem to have had been designed exactly with this use case in mind.  Without them, we still have to buffer to calculate the size of the _HEADERS_ frame.  For background, see issue #76 and the [httpbis PR #548](https://github.com/http2/http2-spec/pull/548).  Needless to say, I do not agree with the rationale behind removing CONTINUATION frames from QUIC.

Footnotes:

1. I am aware of the deadlock hazard brought on by writing the header block and the encoder stream concurrently.  The assumption is that an implementation that writes to packets directly has the logic to do this right.
1. One alternative is to pre-calculate the encoded length of the header block.  This is unworkable because it a) essentially doubles the work; and b) causes buffering of unencoded header fields.

-- 
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/issues/1432#issuecomment-410717845
----==_mimepart_5b68548b946cf_2dde3fe6180be620600b9
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p>I'd like to make another comment related to the EOS symbol.  The QPACK e=
ncoding process produces two outputs: the encoder stream instructions and t=
he header block.  Now that the encoder framing has been removed, the encode=
r instructions can be written directly to the stream, while the associated =
header block must be buffered because we don't know its length [1,2].</p>
<p>We can avoid buffering of the header block by introducing an <em>End of =
the Header Block</em> instruction at the cost of one byte.  The header bloc=
k has just a few instructions and can easily accommodate another one.  This=
 would also force our hand with regard to the Base Index: we'd have to pick=
 it immediately.  On the other hand, it can make the design simpler: just s=
et it to the same value as the Largest Reference.  This will offset the cos=
t of the new EOS instructions, as Base Reference no longer has to be transm=
itted.</p>
<p>For this to work, we'd have to bring back <em>CONTINUATION</em> frames, =
which seem to have had been designed exactly with this use case in mind.  W=
ithout them, we still have to buffer to calculate the size of the <em>HEADE=
RS</em> frame.  For background, see issue <a class=3D"issue-link js-issue-l=
ink" data-error-text=3D"Failed to load issue title" data-id=3D"194408709" d=
ata-permission-text=3D"Issue title is private" data-url=3D"https://github.c=
om/quicwg/base-drafts/issues/76" href=3D"https://github.com/quicwg/base-dra=
fts/issues/76">#76</a> and the <a href=3D"https://github.com/http2/http2-sp=
ec/pull/548">httpbis PR #548</a>.  Needless to say, I do not agree with the=
 rationale behind removing CONTINUATION frames from QUIC.</p>
<p>Footnotes:</p>
<ol>
<li>I am aware of the deadlock hazard brought on by writing the header bloc=
k and the encoder stream concurrently.  The assumption is that an implement=
ation that writes to packets directly has the logic to do this right.</li>
<li>One alternative is to pre-calculate the encoded length of the header bl=
ock.  This is unworkable because it a) essentially doubles the work; and b)=
 causes buffering of unencoded header fields.</li>
</ol>

<p style=3D"font-size:small;-webkit-text-size-adjust:none;color:#666;">&mda=
sh;<br />You are receiving this because you are subscribed to this thread.<=
br />Reply to this email directly, <a href=3D"https://github.com/quicwg/bas=
e-drafts/issues/1432#issuecomment-410717845">view it on GitHub</a>, or <a h=
ref=3D"https://github.com/notifications/unsubscribe-auth/AWbkq0xC43M9Iffyym=
k-wG3VrbXW2qLSks5uOEwLgaJpZM4UgCd3">mute the thread</a>.<img src=3D"https:/=
/github.com/notifications/beacon/AWbkqxGOzb-gdUoWSILmiGfbr3biY4a2ks5uOEwLga=
JpZM4UgCd3.gif" height=3D"1" width=3D"1" alt=3D"" /></p>
<script type=3D"application/json" data-scope=3D"inboxmarkup">{"api_version"=
:"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"Gi=
tHub"},"entity":{"external_key":"github/quicwg/base-drafts","title":"quicwg=
/base-drafts","subtitle":"GitHub repository","main_image_url":"https://asse=
ts-cdn.github.com/images/email/message_cards/header.png","avatar_image_url"=
:"https://assets-cdn.github.com/images/email/message_cards/avatar.png","act=
ion":{"name":"Open in GitHub","url":"https://github.com/quicwg/base-drafts"=
}},"updates":{"snippets":[{"icon":"PERSON","message":"@dtikhonov in #1432: =
I'd like to make another comment related to the EOS symbol.  The QPACK enco=
ding process produces two outputs: the encoder stream instructions and the =
header block.  Now that the encoder framing has been removed, the encoder i=
nstructions can be written directly to the stream, while the associated hea=
der block must be buffered because we don't know its length [1,2].\r\n\r\nW=
e can avoid buffering of the header block by introducing an _End of the Hea=
der Block_ instruction at the cost of one byte.  The header block has just =
a few instructions and can easily accommodate another one.  This would also=
 force our hand with regard to the Base Index: we'd have to pick it immedia=
tely.  On the other hand, it can make the design simpler: just set it to th=
e same value as the Largest Reference.  This will offset the cost of the ne=
w EOS instructions, as Base Reference no longer has to be transmitted.\r\n\=
r\nFor this to work, we'd have to bring back _CONTINUATION_ frames, which s=
eem to have had been designed exactly with this use case in mind.  Without =
them, we still have to buffer to calculate the size of the _HEADERS_ frame.=
  For background, see issue #76 and the [httpbis PR #548](https://github.co=
m/http2/http2-spec/pull/548).  Needless to say, I do not agree with the rat=
ionale behind removing CONTINUATION frames from QUIC.\r\n\r\nFootnotes:\r\n=
\r\n1. I am aware of the deadlock hazard brought on by writing the header b=
lock and the encoder stream concurrently.  The assumption is that an implem=
entation that writes to packets directly has the logic to do this right.\r\=
n1. One alternative is to pre-calculate the encoded length of the header bl=
ock.  This is unworkable because it a) essentially doubles the work; and b)=
 causes buffering of unencoded header fields."}],"action":{"name":"View Iss=
ue","url":"https://github.com/quicwg/base-drafts/issues/1432#issuecomment-4=
10717845"}}}</script>
<script type=3D"application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/quicwg/base-drafts/issues/1432#issuecomment-4=
10717845",
"url": "https://github.com/quicwg/base-drafts/issues/1432#issuecomment-4107=
17845",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [quicwg/base-drafts] Length-prefixes and flow control (#1432)=
",
"sections": [
{
"text": "",
"activityTitle": "**Dmitri Tikhonov**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/=
avatar.png",
"activitySubtitle": "@dtikhonov",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"q=
uicwg/base-drafts\",\n\"issueId\": 1432,\n\"IssueComment\": \"{{IssueCommen=
t.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"qui=
cwg/base-drafts\",\n\"issueId\": 1432\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/quicwg/base-drafts/issues/1432#issuecomment-4107=
17845"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 343943031=
\n}"
}
],
"themeColor": "26292E"
}
]</script>=

----==_mimepart_5b68548b946cf_2dde3fe6180be620600b9--

