Subject: [quicwg/base-drafts] 473d9e: Transport integer encoding proposal

From: Mike Bishop <[email-masked]>
Date: Mon, 30 Oct 2017 16:30:46 -0700

Branch: refs/heads/master
  Home:   https://github.com/quicwg/base-drafts
  Commit: 473d9e7fe1845931528c0bbcc039175bd51a3bf5
      https://github.com/quicwg/base-drafts/commit/473d9e7fe1845931528c0bbcc039175bd51a3bf5
  Author: Martin Thomson <[email-masked]>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

  Changed paths:
    M draft-ietf-quic-transport.md

  Log Message:
  -----------
  Transport integer encoding proposal

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.

This change increases the number of streams to 2^62, but reduces the number of
packets and octets per stream to that same number.  Both are very large values
anyway.  I kept the 2^10 scaling on the connection-level flow control window,
so that goes to 2^72 now.

The cost for ACK is a negligible decrease in efficiency for larger gaps or
ACK blocks (mainly between 64 and 255 in length).  This is counteracted by an
increase in efficiency if there are occasional ranges or gaps larger than 255,
which were previously very difficult to encode correctly.

As previously discussed, the timestamp format is removed.  In its place, we use
the same integer encoding, but with a scaling value, or exponent, that is
signaled in transport parameters, that should allow common ACK delays to be
expressed in fewer octets (an exponent of 0 only allows for 16ms to be encoded
in two octets, but the default exponent is 8, allowing up to 128ms of ACK delay
to be encoded on two octets with an 8us resolution).

I haven't made any changes for HTTP yet, I plan to do that in a separate PR.

  Commit: 06112c66869ae5cb7b1e741cf46417cad9ca7477
      https://github.com/quicwg/base-drafts/commit/06112c66869ae5cb7b1e741cf46417cad9ca7477
  Author: Martin Thomson <[email-masked]>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

  Changed paths:
    M draft-ietf-quic-transport.md

  Log Message:
  -----------
  Review comments

  Commit: 66c5285f8e84786b7cb99dcab744f227c7f16843
      https://github.com/quicwg/base-drafts/commit/66c5285f8e84786b7cb99dcab744f227c7f16843
  Author: Martin Thomson <[email-masked]>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

  Changed paths:
    M draft-ietf-quic-transport.md

  Log Message:
  -----------
  Add a length field to ACK

  Commit: fd78bccd18ebb8fdca9fc6a0cb963d8e992b12b5
      https://github.com/quicwg/base-drafts/commit/fd78bccd18ebb8fdca9fc6a0cb963d8e992b12b5
  Author: Martin Thomson <[email-masked]>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

  Changed paths:
    M draft-ietf-quic-transport.md

  Log Message:
  -----------
  Use a count rather than a length

  Commit: 5c120d002958013b939db714517d98ddebfc97a3
      https://github.com/quicwg/base-drafts/commit/5c120d002958013b939db714517d98ddebfc97a3
  Author: Martin Thomson <[email-masked]>
  Date:   2017-10-19 (Thu, 19 Oct 2017)

  Changed paths:
    M draft-ietf-quic-transport.md

  Log Message:
  -----------
  Subtract one from ranges

  Commit: 7be15c0a449392c2843a35792209bad600829eec
      https://github.com/quicwg/base-drafts/commit/7be15c0a449392c2843a35792209bad600829eec
  Author: Martin Thomson <[email-masked]>
  Date:   2017-10-20 (Fri, 20 Oct 2017)

  Changed paths:
    M draft-ietf-quic-transport.md

  Log Message:
  -----------
  Editorial fixup

  Commit: 12d0946ccaba1bab42b8d3bbb0f12214d13dbc8c
      https://github.com/quicwg/base-drafts/commit/12d0946ccaba1bab42b8d3bbb0f12214d13dbc8c
  Author: Martin Thomson <[email-masked]>
  Date:   2017-10-30 (Mon, 30 Oct 2017)

  Changed paths:
    M draft-ietf-quic-http.md

  Log Message:
  -----------
  Maximal change for HTTP integer encoding

This didn't turn out to be that disruptive.  I'm somewhat worried that I missed
something actually.  Given that the changes are small, I think that I would
prefer this over #887 for #877.

The most interesting change here is that extension frame types that mention
Stream IDs will have to change.  I am not aware of any proposed thus far, so
maybe it's not too much of a cost to bear.  It further confirms my view that we
shouldn't be using Stream IDs at this layer anyway.

Based on this, I don't see any need for a middle-ground change.  The biggest
cost here is in taking the larger Stream ID space, not in taking the integer
encoding.

  Commit: cdae8c393e691843e9e6efc939c2f398e2811312
      https://github.com/quicwg/base-drafts/commit/cdae8c393e691843e9e6efc939c2f398e2811312
  Author: Martin Thomson <[email-masked]>
  Date:   2017-10-30 (Mon, 30 Oct 2017)

  Changed paths:
    M draft-ietf-quic-http.md

  Log Message:
  -----------
  Missed a few fixed-size integers

And a nit

  Commit: 8aaa5e076bbf745f3d36c1f032fbd641860fe899
      https://github.com/quicwg/base-drafts/commit/8aaa5e076bbf745f3d36c1f032fbd641860fe899
  Author: Martin Thomson <[email-masked]>
  Date:   2017-10-30 (Mon, 30 Oct 2017)

  Changed paths:
    M draft-ietf-quic-http.md

  Log Message:
  -----------
  More fixed-size integer residue

  Commit: 89c99638de57e4bb58c36c6309c7647daf3648f6
      https://github.com/quicwg/base-drafts/commit/89c99638de57e4bb58c36c6309c7647daf3648f6
  Author: Mike Bishop <[email-masked]>
  Date:   2017-10-30 (Mon, 30 Oct 2017)

  Changed paths:
    M draft-ietf-quic-transport.md

  Log Message:
  -----------
  Redundant duplication is unnecessary

  Commit: 149b2b8346ba368ea0b203f4e80d84b4cc7fe293
      https://github.com/quicwg/base-drafts/commit/149b2b8346ba368ea0b203f4e80d84b4cc7fe293
  Author: Mike Bishop <[email-masked]>
  Date:   2017-10-30 (Mon, 30 Oct 2017)

  Changed paths:
    M draft-ietf-quic-tls.md
    M draft-ietf-quic-transport.md

  Log Message:
  -----------
  Merge remote-tracking branch 'origin/master' into integers

  Commit: 90b2054a61c791dc1c93aaab6cd6ba606c011583
      https://github.com/quicwg/base-drafts/commit/90b2054a61c791dc1c93aaab6cd6ba606c011583
  Author: Mike Bishop <[email-masked]>
  Date:   2017-10-30 (Mon, 30 Oct 2017)

  Changed paths:
    M draft-ietf-quic-http.md
    M draft-ietf-quic-transport.md

  Log Message:
  -----------
  Merge pull request #877 from quicwg/integers

Variable-length integer encoding

Compare: https://github.com/quicwg/base-drafts/compare/20ce92f6843b...90b2054a61c7