Subject: [quicwg/base-drafts] QPACK single pass encoding (#1239)

From: afrind <[email-masked]>
Date: Mon, 19 Mar 2018 06:30:02 -0700

1. Changes the header block prefix and removes the BLOCKING flag
2. Re-uses table modification code points on request streams for "above base" indexing
3. Include a sample 1-pass encoding algorithm

Fixes #1138
You can view, comment on, or merge this pull request online at:

  https://github.com/quicwg/base-drafts/pull/1239

-- Commit Summary --

  * QPACK single pass encoding

-- File Changes --

    M draft-ietf-quic-http.md (11)
    M draft-ietf-quic-qpack.md (174)

-- Patch Links --

https://github.com/quicwg/base-drafts/pull/1239.patch
https://github.com/quicwg/base-drafts/pull/1239.diff

-- 
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/1239

---

From: Mike Bishop <[email-masked]>
Date: Tue, 20 Mar 2018 11:23:06 +0000 (UTC)

MikeBishop commented on this pull request.

I think you're correct that this is what you need for references to enable single-pass encoding.  However, I feel like you're really wasting bytes by adding in the static table size.  If you're going to define a new instruction, you know that you can't have added to the static table, so just make 1 (or 0) the first entry added during the encode and so on.

> -The header block contains a prefix ({{absolute-index}}). This prefix contains
-table offset information that establishes total ordering among all headers,
-regardless of reordering in the transport (see {{overview-absolute}}).
-
-In blocking mode, the prefix additionally identifies the minimum state required
-to process any vulnerable references in the header block (see `Depends Index` in
-{{overview-absolute}}).  The decoder keeps track of which entries have been
-added to its dynamic table.  The stream for a header with BLOCKING flag set is
-considered blocked by the decoder and can not be processed until all entries in
-the range `[1, Depends Index]` have been added.  While blocked, header
-field data MUST remain in the blocked stream's flow control window.
+avoiding them).
+
+QPACK header blocks contains a prefix ({{absolute-index}}) that specifies the
+minimum state of the decoder required to process the block. If the decoder does
+not yet have the required state, it must defer processing until it reaches the

Probably "will need to."  We're no longer prohibited from using the lower-case versions of the keywords, but it's still good practice to avoid confusion and you already have a MUST in the next sentence.

> +used with different instructions that tell the decoder to use a different
+mechanism to calculate an entry's absolute index.
+
+### Literal with Above Base Name Index
+
+Literal with Above Base Name Index reuses the Literal with Incremental
+Indexing instruction, and is represented as follows:
+
+~~~~~~~~~~  drawing
+    0 1 2 3 4 5 6 7
+   +-+-+-+-+-+-+-+-+
+   |0|1| Index (6+)|
+   +---------------+
+   |H|Value Len(8+)|
+   +---------------+
+   |Value (*)      |

We've generally been centering labels, though QPACK/HPACK have such narrow diagrams they usually consume the whole width.

> +   +---------------+
+~~~~~~~~~~
+
+### Indexed Header Field with Above Base Index
+
+Indexed Header Field with Above Base Index reuses the Table Size Update
+instruction, and is represented as follows:
+
+~~~~~~~~~~  drawing
+    0 1 2 3 4 5 6 7
+   +-+-+-+-+-+-+-+-+
+   |0|0|1|Index(5+)|
+   +---------------+
+~~~~~~~~~~
+
+

I feel like these need more description in the instruction, even though you have a generally good description up above.  Maybe just some relocation/duplication of text?

-- 
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/1239#pullrequestreview-105296763

---

From: afrind <[email-masked]>
Date: Tue, 20 Mar 2018 14:13:05 +0000 (UTC)

afrind commented on this pull request.

or present tense: "...it defers processing"

-- 
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/1239#discussion_r175779473

---

From: afrind <[email-masked]>
Date: Tue, 20 Mar 2018 14:23:53 +0000 (UTC)

I can remove the static table size.  I added it for consistency - eg: all dynamic table references are shifted by this amount, but it's really gratuitous in this case (also in Index-Duplication)

-- 
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/1239#issuecomment-374616161

---

From: Mike Bishop <[email-masked]>
Date: Tue, 20 Mar 2018 07:32:01 -0700

Yep, that's better.

-- 
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/1239#discussion_r175787203