From e6f4b9a1cf82ca84a35794c906e336734d962d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Tue, 22 Oct 2019 19:16:46 -0400 Subject: [PATCH 1/6] Improve language on blocking entries. Remove "insertion has been acknowledged" phrase to avoid confusion between Header Acknowledgement instructions implicitly acknowledging encoder stream instructions and explicitly acknowledging header blocks. Use Known Received Count instead. Clarify that references on the encoder stream do not block an entry from eviction. Trivial as it is, I overlooked this at first, and added quite some unnecessary complexity that was eventually removed at https://quiche.googlesource.com/quiche/+/b09d44167c543b80b2c27408dd1f9df3b07c9741. My motivation here is to help future implementers to avoid this pitfall. Merge redundant Reference Tracking section into Blocked Dynamic Table Insertions. Change style of "Note" at end of section for consistency. There were already four sentences starting with "Note that" throughout the draft before this PR (now there are six), but no other "Note:" markdown. --- draft-ietf-quic-qpack.md | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/draft-ietf-quic-qpack.md b/draft-ietf-quic-qpack.md index 35ca5da89b..64b8f8f232 100644 --- a/draft-ietf-quic-qpack.md +++ b/draft-ietf-quic-qpack.md @@ -188,28 +188,25 @@ input header list. QPACK is designed to contain the more complex state tracking to the encoder, while the decoder is relatively simple. -### Reference Tracking - -An encoder MUST ensure that a header block which references a dynamic table -entry is not processed by the decoder after the referenced entry has been -evicted. Hence the encoder needs to retain information about each compressed -header block that references the dynamic table until that header block is -acknowledged by the decoder (see {{header-acknowledgement}}). - ### Blocked Dynamic Table Insertions {#blocked-insertion} -A dynamic table entry is considered blocking and cannot be evicted until its -insertion has been acknowledged and there are no outstanding unacknowledged -references to the entry. In particular, a dynamic table entry that has never -been referenced can still be blocking. +A dynamic table entry is blocking if its absolute index is larger than or equal +to the Known Received Count, or if it is referenced by an unacknowledged header +block. In particular, a dynamic table entry that has never been referenced can +still be blocking. + +Note that references on the encoder stream do not make an entry blocking, +because those are guaranteed to be processed before the instruction that evicts +the entry. An encoder MUST NOT insert an entry into the dynamic table (or duplicate an existing entry) if doing so would evict a blocking entry. In order to avoid -this, an encoder that uses the dynamic table has to keep track of blocking -entries. +this, the encoder needs to retain information about each header block that +references the dynamic table until that header block is acknowledged by the +decoder (see {{header-acknowledgement}}). -Note: -: A blocking entry is unrelated to a blocked stream, see {{blocked-streams}}. +Note that a blocking entry is unrelated to a blocked stream, see +{{blocked-streams}}. #### Avoiding Blocked Insertions From ab210a07bdaa4ab13fd79d538a5074fd5afbb35a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Tue, 29 Oct 2019 08:01:42 -0400 Subject: [PATCH 2/6] Revert changing acknowledging insertion to comparing absolute index to Known Received Count. --- draft-ietf-quic-qpack.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/draft-ietf-quic-qpack.md b/draft-ietf-quic-qpack.md index 64b8f8f232..ed15cd0bb3 100644 --- a/draft-ietf-quic-qpack.md +++ b/draft-ietf-quic-qpack.md @@ -190,10 +190,10 @@ while the decoder is relatively simple. ### Blocked Dynamic Table Insertions {#blocked-insertion} -A dynamic table entry is blocking if its absolute index is larger than or equal -to the Known Received Count, or if it is referenced by an unacknowledged header -block. In particular, a dynamic table entry that has never been referenced can -still be blocking. +A dynamic table entry is blocking if its insertion has not been acknowledged by +the decoder, or if it is referenced by an unacknowledged header block. In +particular, a dynamic table entry that has never been referenced can still be +blocking. Note that references on the encoder stream do not make an entry blocking, because those are guaranteed to be processed before the instruction that evicts From 9fd0b8bece2994dc2fe5a321657469c5fea4918d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Tue, 29 Oct 2019 08:12:48 -0400 Subject: [PATCH 3/6] Remove unnecessary wordcrafting to blocked-insertion first paragraph. --- draft-ietf-quic-qpack.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/draft-ietf-quic-qpack.md b/draft-ietf-quic-qpack.md index ed15cd0bb3..ba36c336d6 100644 --- a/draft-ietf-quic-qpack.md +++ b/draft-ietf-quic-qpack.md @@ -190,10 +190,10 @@ while the decoder is relatively simple. ### Blocked Dynamic Table Insertions {#blocked-insertion} -A dynamic table entry is blocking if its insertion has not been acknowledged by -the decoder, or if it is referenced by an unacknowledged header block. In -particular, a dynamic table entry that has never been referenced can still be -blocking. +A dynamic table entry is considered blocking and cannot be evicted until its +insertion has been acknowledged and there are no outstanding unacknowledged +references to the entry. In particular, a dynamic table entry that has never +been referenced can still be blocking. Note that references on the encoder stream do not make an entry blocking, because those are guaranteed to be processed before the instruction that evicts From 988da438a3fec2226f64bf5a03511ce23ecb6247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Thu, 7 Nov 2019 09:33:22 -0500 Subject: [PATCH 4/6] wordsmithing --- draft-ietf-quic-qpack.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/draft-ietf-quic-qpack.md b/draft-ietf-quic-qpack.md index 6b00ae28d4..9c1c98548a 100644 --- a/draft-ietf-quic-qpack.md +++ b/draft-ietf-quic-qpack.md @@ -196,10 +196,10 @@ contains entries which cannot be evicted. A dynamic table entry cannot be evicted immediately after insertion, even if it has never been referenced. Once the insertion of a dynamic table entry has been acknowledged and there are no outstanding references to the entry in -unacknowledged header blocks, the entry becomes evictable. Note that references -on the encoder stream do not prevent an entry from being evictable, because -those references are guaranteed to be processed before the instruction that -evicts the entry. +unacknowledged header blocks, the entry becomes evictable. Note that +unacknowledged references on the encoder stream do not preclude the eviction of +an entry, because those references are guaranteed to be processed before the +instruction evicting the entry. If the dynamic table does not contain enough room for a new entry without evicting other entries, and the entries which would be evicted are not From 0276f7d21767fc99b360e7c4f7a5218dd8cf66da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Thu, 7 Nov 2019 09:33:49 -0500 Subject: [PATCH 5/6] nit --- draft-ietf-quic-qpack.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/draft-ietf-quic-qpack.md b/draft-ietf-quic-qpack.md index 9c1c98548a..faa6f3f26e 100644 --- a/draft-ietf-quic-qpack.md +++ b/draft-ietf-quic-qpack.md @@ -205,9 +205,9 @@ If the dynamic table does not contain enough room for a new entry without evicting other entries, and the entries which would be evicted are not evictable, the encoder MUST NOT insert that entry into the dynamic table (including duplicates of existing entries). In order to avoid this, an encoder -that uses the dynamic table has to keep track of each dynamic table referenced -by each header block until that header block is acknowledged by the decoder (see -{{header-acknowledgement}}). +that uses the dynamic table has to keep track of each dynamic table entry +referenced by each header block until that header block is acknowledged by the +decoder (see {{header-acknowledgement}}). #### Avoiding Prohibited Insertions From ff3e3ddcbbfdc0c180b7d0df6428095edc36f8dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Thu, 20 Feb 2020 13:21:45 -0500 Subject: [PATCH 6/6] Minor rewording --- draft-ietf-quic-qpack.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/draft-ietf-quic-qpack.md b/draft-ietf-quic-qpack.md index 578f98b5c8..e4b8907845 100644 --- a/draft-ietf-quic-qpack.md +++ b/draft-ietf-quic-qpack.md @@ -197,9 +197,9 @@ A dynamic table entry cannot be evicted immediately after insertion, even if it has never been referenced. Once the insertion of a dynamic table entry has been acknowledged and there are no outstanding references to the entry in unacknowledged header blocks, the entry becomes evictable. Note that -unacknowledged references on the encoder stream do not preclude the eviction of -an entry, because those references are guaranteed to be processed before the -instruction evicting the entry. +references on the encoder stream never preclude the eviction of an entry, +because those references are guaranteed to be processed before the instruction +evicting the entry. If the dynamic table does not contain enough room for a new entry without evicting other entries, and the entries which would be evicted are not