Subject: [quicwg/base-drafts] Integers (#877)

From: Martin Thomson <[email-masked]>
Date: Sun, 15 Oct 2017 17:28:10 -0700

This isn't quite ready - I have to make some changes in the HTTP doc, but I thought that I'd share it now so that we have a better location for discussion.

This proposal replaces all integer encodings in frames with a unified variable-length encoding format.  It simplifies the encoding considerably, most noticeably in the ACK frame, which I have largely rewritten.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Transport integer encoding proposal
  * Review comments
  * Add a length field to ACK

-- File Changes --

    A .draft-ietf-quic-http-07.upload (17)
    A .draft-ietf-quic-tls-07.upload (16)
    A .draft-ietf-quic-transport-07.upload (16)
    M draft-ietf-quic-transport.md (386)

-- Patch Links --

https://github.com/quicwg/base-drafts/pull/877.patch
https://github.com/quicwg/base-drafts/pull/877.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/877

---

From: Martin Thomson <[email-masked]>
Date: Tue, 17 Oct 2017 03:28:23 +0000 (UTC)

@martinthomson pushed 1 commit.

c3bdb5e  Use a count rather than a length

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/877/files/2318887545df411c0d17387d41e82f3d2e16ac75..c3bdb5ebb3a4bf22b86de5ce5d32766205642155

---

From: Martin Thomson <[email-masked]>
Date: Tue, 17 Oct 2017 04:10:57 +0000 (UTC)

5990de1  Remove upload files and ignore them

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/877/files/c3bdb5ebb3a4bf22b86de5ce5d32766205642155..5990de17fd28957b4c0b2e902d24a00e389f0735

---

From: Martin Thomson <[email-masked]>
Date: Thu, 19 Oct 2017 02:35:41 +0000 (UTC)

5c120d0  Subtract one from ranges

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/877/files/fd78bccd18ebb8fdca9fc6a0cb963d8e992b12b5..5c120d002958013b939db714517d98ddebfc97a3

---

From: ianswett <[email-masked]>
Date: Thu, 19 Oct 2017 13:20:20 +0000 (UTC)

ianswett commented on this pull request.

Thanks for updating the ack section, some editorial suggestions.

 : Contains one or more blocks of packet numbers which have been successfully
   received, see {{ack-block-section}}.

 ### ACK Block Section {#ack-block-section}
 
-The ACK Block Section contains between one and 256 blocks of packet numbers
-which have been successfully received. If the Num Blocks field is absent, only
-the First ACK Block length is present in this section. Otherwise, the Num Blocks
-field indicates how many additional blocks follow the First ACK Block Length
-field.
+The ACK Block Section consists of alternating ACK Blocks and Gaps.  A First Ack
+Block is followed by a variable number of alternating Gap and Additional ACK
+Blocks.  The number of Additional ACK Blocks and Gaps is determined by the ACK

I'd always say "Gaps and Blocks" instead of "Blocks and Gaps" since that's the order in the previous sentence.

 : Contains one or more blocks of packet numbers which have been successfully
   received, see {{ack-block-section}}.

 ### ACK Block Section {#ack-block-section}
 
-The ACK Block Section contains between one and 256 blocks of packet numbers
-which have been successfully received. If the Num Blocks field is absent, only
-the First ACK Block length is present in this section. Otherwise, the Num Blocks
-field indicates how many additional blocks follow the First ACK Block Length
-field.
+The ACK Block Section consists of alternating ACK Blocks and Gaps.  A First Ack

I'd note that they're in descending order immediately, since it's been a source of confusion.  ie: "The ACK Block Section consists of alternating ACK Blocks and Gaps in descending packet number order."

>  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~~~
 {: #ack-block-format title="ACK Block Section"}
 
-The fields in the ACK Block Section are:
+Each ACK Block acknowledges a contiguous range of packets by indicating the
+number of packets that acknowledged preceding the largest packet number in that

Remove "that" before acknowledged.

-: An unsigned packet number delta that indicates the number of contiguous
-  packets being acknowledged starting after the end of the previous gap.
-  Repeated "Num Blocks" times.
+: A variable-length indicating the number of contiguous packets preceding the

variable-length integer?

-#### Time Format
+: A non-zero, variable-length integer indicating specifying the number of

Zero is ok now, correct?  And I think the subsequent text needs to be updated to match the above sentence: "The number of packets in the gap is one higher than the encoded value of the Gap Field."

> -explicit bits of mantissa and 5 bits of explicit exponent, specifying time in
-microseconds.  The bit format is loosely modeled after IEEE 754.  For example, 1
-microsecond is represented as 0x1, which has an exponent of zero, presented in
-the 5 high order bits, and mantissa of 1, presented in the 11 low order bits.
-When the explicit exponent is greater than zero, an implicit high-order 12th bit
-of 1 is assumed in the mantissa.  For example, a floating value of 0x800 has an
-explicit exponent of 1, as well as an explicit mantissa of 0, but then has an
-effective mantissa of 4096 (12th bit is assumed to be 1).  Additionally, the
-actual exponent is one-less than the explicit exponent, and the value represents
-4096 microseconds.  Any values larger than the representable range are clamped
-to 0xFFFF.
+: A variable-length integer indicating the number of contiguous acknowledged
+  packets preceding the largest packet number, as determined by the
+  preceding Gap.
+
+If the repeated Gap and ACK Block fields do not end precisely at the end of

I don't think this paragraph is true, so should be removed?

 Offset:
 
-: A variable-sized unsigned number specifying the byte offset in the stream for
-  the data in this STREAM frame.  When the offset length is 0, the offset is 0.
-  The first byte in the stream has an offset of 0.  The largest offset delivered
-  on a stream - the sum of the re-constructed offset and data length - MUST be
-  less than 2^64.
+: A variable-sized integer specifying the byte offset in the stream for the data

You use variable-length elsewhere

-- 
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/877#pullrequestreview-70525794

---

From: Martin Thomson <[email-masked]>
Date: Thu, 19 Oct 2017 16:18:39 -0700

7be15c0  Editorial fixup

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/877/files/5c120d002958013b939db714517d98ddebfc97a3..7be15c0a449392c2843a35792209bad600829eec

---

From: ianswett <[email-masked]>
Date: Fri, 20 Oct 2017 13:45:33 +0000 (UTC)

-#### Time Format
+: A variable-length integer indicating specifying the number of contiguous

indicating specifying is redundant.  Also, you alternate between using indicating and specifying in these sections.  Is it worth consistently using one or the other?

-- 
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/877#pullrequestreview-70846524

---

From: ianswett <[email-masked]>
Date: Thu, 26 Oct 2017 12:23:45 -0700

ianswett approved this pull request.

I'm happy with merging this, minus the one "indicating specifying" editorial nit I commented on.

-- 
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/877#pullrequestreview-72311758

---

From: Mike Bishop <[email-masked]>
Date: Mon, 30 Oct 2017 23:21:56 +0000 (UTC)

@MikeBishop pushed 3 commits.

12d0946  Maximal change for HTTP integer encoding
cdae8c3  Missed a few fixed-size integers
8aaa5e0  More fixed-size integer residue

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/877/files/7be15c0a449392c2843a35792209bad600829eec..8aaa5e076bbf745f3d36c1f032fbd641860fe899

---

From: Mike Bishop <[email-masked]>
Date: Mon, 30 Oct 2017 23:26:24 +0000 (UTC)

@MikeBishop pushed 1 commit.

89c9963  Redundant duplication is unnecessary

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/877/files/8aaa5e076bbf745f3d36c1f032fbd641860fe899..89c99638de57e4bb58c36c6309c7647daf3648f6

---

From: Mike Bishop <[email-masked]>
Date: Mon, 30 Oct 2017 23:29:25 +0000 (UTC)

149b2b8  Merge remote-tracking branch 'origin/master' into integers

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/877/files/89c99638de57e4bb58c36c6309c7647daf3648f6..149b2b8346ba368ea0b203f4e80d84b4cc7fe293

---

From: Mike Bishop <[email-masked]>
Date: Mon, 30 Oct 2017 23:30:51 +0000 (UTC)

Merged #877.

-- 
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/877#event-1317779343