-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QCRAM opcodes with non-byte-aligned string literals #1144
Conversation
draft-ietf-quic-qcram.md
Outdated
5.2 of [RFC7541]). A value 0 is used in place of the table reference, followed | ||
by the header field name. | ||
|
||
### Insert Without Reference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without Name Reference
draft-ietf-quic-qcram.md
Outdated
+---+---+-----------------------+ | ||
| H | Name Length (7+) | | ||
+---+---------------------------+ | ||
| 0 | 0 | H | Name Length (5+) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost a bike shed: invert the second bit here. Then you can reasonably say that you are describing 11 (insert with static name reference), 10 (insert with dynamic name reference), 01 (insert with new name), 00 (duplication).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not wholly sure that makes a difference, but I suppose there's an argument to be made that '00' is the "unique" one.
Having separately discussed bringing back table size change, there are now five instructions, so "00" represents "uncommon things" with a third bit to differentiate duplicate versus size change. Purely by coincidence, that means size change is now identical to the HPACK instruction. |
Based on #1141 and sparked by a comment on that PR that I'd like to discuss separately. There are effectively four instructions in a table update:
#1141 follows HPACK's lead in treating insert as a single instruction with internal flags describing different possible references. That leads to effectively using two-bit prefixes for (1)/(2-3), a sentinel value in the index to differentiate (2)/(3), and (4) gets a single-bit instruction code even though it's the least common. This PR treats them as four instructions and uses two-bit prefixes for each.
The impact of this is break-even for literals which reference a name from the header table. The benefit is that you save a byte on almost every header which is inserted without a name reference.
The cost is: