maskit commented on PR #14019:
URL: https://github.com/apache/trafficserver/pull/14019#issuecomment-6756694256
On "Resume QPACK decodes once the dynamic table catches up": the resume
condition should follow RFC 9204, and the new tests should assert RFC behavior.
Some background, since the code makes this easy to miss: QPACK.cc was
written against draft-ietf-quic-qpack-01, where the prefix was a raw "Largest
Reference" (the largest absolute index referenced, with indices starting at 1).
That's where names like `largest_reference` and the raw prefix handling come
from, and the test from PR 14001 describes the prefix the same way. That
implementation never worked correctly, and the dynamic table has since switched
to zero-based indices, so the code matches neither the draft nor the RFC. RFC
9204 is the reference here, not the existing code.
Section 2.2.1 unblocks a stream once the Insert Count is at least the
Required Insert Count, which the decoder reconstructs from the encoded prefix
(Section 4.5.1.1: `EncInsertCount = (ReqInsertCount mod (2 * MaxEntries)) +
1`). `_is_blocked()` instead compares the raw prefix byte with
`largest_index()`, so a blocked block resumes at the wrong time. With the RFC's
Appendix B.2 example on this branch, `03 81 10` (Required Insert Count 2) stays
parked after B.2's two inserts and resumes only after a fourth insert.
The new tests encode the same mismatch. They label `{0x01, 0x00, 0x80}` as
"Required Insert Count 1", but with a capacity of 128 an encoded 1 reconstructs
to 0, which is an error. nghttp3 rejects the block with
QPACK_DECOMPRESSION_FAILED. The RFC encoding of Required Insert Count 1 is
`{0x02, 0x00, 0x80}`: it should stay blocked with no inserts and decode `first`
after one insert, which is what nghttp3 does. Could the tests use RFC encodings
like that, and the resume check compare the reconstructed Required Insert Count
with the Insert Count?
On "Copy the header block into a blocked QPACK decode": the copy is fine for
now, but it should go away in a follow-up. The bytes already live in the
stream's IOBufferBlocks, and `IOBufferBlock::clone()` shares the underlying
`IOBufferData`, so a blocked decode could hold a block reference instead. Doing
that also means `Http3HeadersFrame::_parse()` keeping a reference rather than
copying the header block out for every HEADERS frame.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]