From 7155dcc0b47f9a1ca99e59e45777f4f8f7baeb98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Wed, 31 Jul 2019 11:19:04 -0400 Subject: [PATCH 1/8] non-controversial one-offs --- draft-ietf-quic-qpack.md | 200 +++++++++++++++++++-------------------- 1 file changed, 100 insertions(+), 100 deletions(-) diff --git a/draft-ietf-quic-qpack.md b/draft-ietf-quic-qpack.md index daa77f930b..d4219819c7 100644 --- a/draft-ietf-quic-qpack.md +++ b/draft-ietf-quic-qpack.md @@ -84,7 +84,7 @@ code and issues list for this draft can be found at The QUIC transport protocol {{QUIC-TRANSPORT}} is designed to support HTTP semantics, and its design subsumes many of the features of HTTP/2 {{?RFC7540}}. -HTTP/2 uses HPACK ({{!RFC7541}}) for header compression. If HPACK were used for +HTTP/2 uses HPACK {{!RFC7541}} for header compression. If HPACK were used for HTTP/3 {{HTTP3}}, it would induce head-of-line blocking due to built-in assumptions of a total ordering across frames on all streams. @@ -192,7 +192,7 @@ while the decoder is relatively simple. 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 track information about each compressed +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}}). @@ -203,15 +203,13 @@ 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: -: A blocking entry is unrelated to a blocked stream, which is a stream that a - decoder cannot decode as a result of references to entries that are not yet - available. An encoder that uses the dynamic table has to keep track of - blocked entries. - An encoder MUST NOT insert an entry into the dynamic table (or duplicate an -existing entry) if doing so would evict a blocking entry. +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. +Note: +: A blocking entry is unrelated to a blocked stream, see {{blocked-streams}}. #### Avoiding Blocked Insertions @@ -260,7 +258,7 @@ table, the Required Insert Count is zero. When the decoder receives a header block with a Required Insert Count greater than its own Insert Count, the stream cannot be processed immediately, and is -considered "blocked" (see {blocked-decoding}). +considered "blocked" (see {{blocked-decoding}}). The SETTINGS_QPACK_BLOCKED_STREAMS setting (see {{configuration}}) specifies an upper bound on the number of streams which can be blocked. An encoder MUST limit @@ -272,25 +270,26 @@ An encoder can decide whether to risk having a stream become blocked. If permitted by the value of SETTINGS_QPACK_BLOCKED_STREAMS, compression efficiency can often be improved by referencing dynamic table entries that are still in transit, but if there is loss or reordering the stream can become blocked at the -decoder. An encoder avoids the risk of blocking by only referencing dynamic +decoder. An encoder can avoid the risk of blocking by only referencing dynamic table entries which have been acknowledged, but this could mean using literals. Since literals make the header block larger, this can result in the encoder becoming blocked on congestion or flow control limits. ### Known Received Count -In order to identify which dynamic table entries can be safely used without a -stream becoming blocked, the encoder tracks the number of entries received by -the decoder. The Known Received Count tracks the total number of acknowledged -insertions. +The Known Received Count is the total number of dynamic table insertions and +duplications acknowledged by the decoder. The encoder tracks the Known Received +Count in order to identify which dynamic table entries can be references without +potentially blocking a stream. The decoder tracks the Known Received Count in +order to be able to send Insert Count Increment instructions (see +{{insert-count-increment}}). -When blocking references are permitted, the encoder uses Header Acknowledgement -instructions ({{header-acknowledgement}}) to maintain the Known Received -Count. If a header block was potentially blocking, the acknowledgement implies -that the decoder has received all dynamic table state necessary to process the -header block. If the Required Insert Count of an acknowledged header block was -greater than the encoder's current Known Received Count, the block's Required -Insert Count becomes the new Known Received Count. +If a header block was potentially blocking, the encoder infers from receiving a +Header Acknowledgement instruction ({{header-acknowledgement}}) that the decoder +has received all dynamic table state necessary to process that header block. If +the Required Insert Count of the acknowledged header block is greater than the +current Known Received Count, the encoder updates the Known Received Count to +the value of the Required Insert Count of the acknowledged header block. To acknowledge dynamic table entries which are not referenced by header blocks, for example because the encoder or the decoder have chosen not to risk blocked @@ -301,8 +300,11 @@ streams, the decoder sends an Insert Count Increment instruction (see ## Decoder As in HPACK, the decoder processes header blocks and emits the corresponding -header lists. It also processes dynamic table modifications from encoder -instructions received on the encoder stream. +header lists. It also processes instructions received on the encoder stream that +modify the dynamic table. Note that header blocks and encoder stream +instructions arrive on separate streams. This is unlike HPACK, where header +blocks can contain instructions that modify the dynamic table, and there is no +dedicated stream of HPACK instructions. The decoder MUST emit header fields in the order their representations appear in the input header block. @@ -318,7 +320,6 @@ While blocked, header block data SHOULD remain in the blocked stream's flow control window. A stream becomes unblocked when the Insert Count becomes greater than or equal to the Required Insert Count for all header blocks the decoder has started reading from the stream. - When processing header blocks, the decoder expects the Required Insert Count to exactly match the value defined in {{blocked-streams}}. If it encounters a @@ -404,8 +405,8 @@ All entries in the static table have a name and a value. However, values can be empty (that is, have a length of 0). Each entry is identified by a unique index. -Note the QPACK static table is indexed from 0, whereas the HPACK static table -is indexed from 1. +Note that the QPACK static table is indexed from 0, whereas the HPACK static +table is indexed from 1. When the decoder encounters an invalid static table index in a header block representation it MUST treat this as a connection error of type @@ -430,12 +431,9 @@ Dynamic table entries can have empty values. The size of the dynamic table is the sum of the size of its entries. -The size of an entry is the sum of its name's length in bytes (as defined in -{{string-literals}}), its value's length in bytes, and 32. - -The size of an entry is calculated using the length of its name and value -without Huffman encoding applied. - +The size of an entry is the sum of its name's length in bytes, its value's +length in bytes, and 32. The size of an entry is calculated using the length of +its name and value without Huffman encoding applied. ### Dynamic Table Capacity and Eviction {#eviction} @@ -445,19 +443,23 @@ encoder sends a Set Dynamic Table Capacity instruction ({{set-dynamic-capacity}}) with a non-zero capacity to begin using the dynamic table. -Before a new entry is added to the dynamic table, entries are evicted from the -end of the dynamic table until the size of the dynamic table is less than or -equal to (table capacity - size of new entry). The encoder MUST NOT evict a -blocking dynamic table entry (see {{blocked-insertion}}). The entry is then -added to the table. It is an error if the encoder attempts to add an entry that -is larger than the dynamic table capacity; the decoder MUST treat this as a +When a new entry is added to the dynamic table, the minimum number of entries +are evicted from the end of the dynamic table so that the final table size +including the new entry does not exceed the table capacity. This can be +achieved by adding the new entry and then removing entries from the end until +the table size is less than or equal to the table capacity. Another option is +to first evict entries until the size of the dynamic table is less than or equal +to (table capacity - size of new entry), then add the new entry. Note that a +new entry can reference an entry in the dynamic table that will be evicted when +adding this new entry. Therefore implementations utilizing the latter option +are cautioned to avoid deleting the referenced name or value if the referenced +entry is evicted from the dynamic table prior to inserting the new entry. + +The encoder MUST NOT cause a blocking dynamic table entry to be evicted (see +{{blocked-insertion}}). It is an error if the encoder attempts to add an entry +that is larger than the dynamic table capacity; the decoder MUST treat this as a connection error of type `HTTP_QPACK_ENCODER_STREAM_ERROR`. -A new entry can reference an entry in the dynamic table that will be evicted -when adding this new entry into the dynamic table. Implementations are -cautioned to avoid deleting the referenced name or value if the referenced entry -is evicted from the dynamic table prior to inserting the new entry. - Whenever the dynamic table capacity is reduced by the encoder (see {{set-dynamic-capacity}}), entries are evicted from the end of the dynamic table until the size of the dynamic table is less than or equal to the new table @@ -477,10 +479,10 @@ it can choose to use a lower dynamic table capacity (see For clients using 0-RTT data in HTTP/3, the server's maximum table capacity is the remembered value of the setting, or zero if the value was not previously -sent. When the client's 0-RTT value of the SETTING is 0, the server MAY set it -to a non-zero value in its SETTINGS frame. If the remembered value is non-zero, -the server MUST send the same non-zero value in its SETTINGS frame. If it -specifies any other value, or omits SETTINGS_QPACK_MAX_TABLE_CAPACITY from +sent. When the client's 0-RTT value of the SETTING is zero, the server MAY set +it to a non-zero value in its SETTINGS frame. If the remembered value is +non-zero, the server MUST send the same non-zero value in its SETTINGS frame. +If it specifies any other value, or omits SETTINGS_QPACK_MAX_TABLE_CAPACITY from SETTINGS, the encoder must treat this as a connection error of type `HTTP_QPACK_DECODER_STREAM_ERROR`. @@ -488,17 +490,16 @@ For HTTP/3 servers and HTTP/3 clients when 0-RTT is not attempted or is rejected, the maximum table capacity is 0 until the encoder processes a SETTINGS frame with a non-zero value of SETTINGS_QPACK_MAX_TABLE_CAPACITY. -When the maximum table capacity is 0, the encoder MUST NOT insert entries into -the dynamic table, and MUST NOT send any encoder instructions on the encoder -stream. +When the maximum table capacity is zero, the encoder MUST NOT insert entries +into the dynamic table, and MUST NOT send any encoder instructions on the +encoder stream. ### Absolute Indexing {#indexing} -Each entry possesses both an absolute index which is fixed for the lifetime of -that entry and a relative index which changes based on the context of the -reference. The first entry inserted has an absolute index of "0"; indices -increase by one with each insertion. +Each entry possesses an absolute index which is fixed for the lifetime of that +entry. The first entry inserted has an absolute index of "0"; indices increase +by one with each insertion. ### Relative Indexing @@ -507,10 +508,10 @@ Relative indices begin at zero and increase in the opposite direction from the absolute index. Determining which entry has a relative index of "0" depends on the context of the reference. -In encoder instructions, a relative index of "0" always refers to the most -recently inserted value in the dynamic table. Note that this means the entry -referenced by a given relative index will change while interpreting instructions -on the encoder stream. +In encoder instructions (see {{encoder-instructions}}), a relative index of "0" +refers to the most recently inserted value in the dynamic table. Note that this +means the entry referenced by a given relative index will change while +interpreting instructions on the encoder stream. ~~~~~ drawing +-----+---------------+-------+ @@ -527,7 +528,7 @@ d = count of entries dropped ~~~~~ {: title="Example Dynamic Table Indexing - Encoder Stream"} -Unlike encoder instructions, relative indices in header block representations +Unlike in encoder instructions, relative indices in header block representations are relative to the Base at the beginning of the header block (see {{header-prefix}}). This ensures that references are stable even if header blocks and dynamic table updates are processed out of order. @@ -555,9 +556,10 @@ d = count of entries dropped ### Post-Base Indexing {#post-base} -Post-Base indices are used for entries with absolute indexes greater than or -equal to Base, starting at 0 for the entry with absolute index equal to Base, -and increasing in the same direction as the absolute index. +Post-Base indices are used in header block instructions for entries with +absolute indices greater than or equal to Base, starting at 0 for the entry with +absolute index equal to Base, and increasing in the same direction as the +absolute index. Post-Base indices allow an encoder to process a header block in a single pass and include references to entries added while processing this (or other) header @@ -586,8 +588,10 @@ d = count of entries dropped ### Prefixed Integers The prefixed integer from Section 5.1 of [RFC7541] is used heavily throughout -this document. The format from [RFC7541] is used unmodified. QPACK -implementations MUST be able to decode integers up to 62 bits long. +this document. The format from [RFC7541] is used unmodified. Note, however, +that QPACK uses some prefix sizes not actually used in HPACK. + +QPACK implementations MUST be able to decode integers up to 62 bits long. ### String Literals @@ -603,7 +607,8 @@ is used without modification. This document expands the definition of string literals and permits them to begin other than on a byte boundary. An "N-bit prefix string literal" begins with the same Huffman flag, followed by the length encoded as an (N-1)-bit -prefix integer. The remainder of the string literal is unmodified. +prefix integer. The prefix size, N, can have a value between 2 and 8. The +remainder of the string literal is unmodified. A string literal without a prefix length noted is an 8-bit prefix string literal and follows the definitions in [RFC7541] without modification. @@ -627,14 +632,14 @@ type HTTP_WRONG_STREAM_COUNT. These streams MUST NOT be closed. Closure of either unidirectional stream type MUST be treated as a connection error of type HTTP_CLOSED_CRITICAL_STREAM. -An endpoint MAY avoid creating its own encoder stream if it's not going to be -used (for example if the endpoint doesn't wish to use the dynamic table, or if +An endpoint MAY choose not to create an encoder stream if it's not going to be +used (for example if its encoder doesn't wish to use the dynamic table, or if the maximum size of the dynamic table permitted by the peer is zero). -An endpoint MAY avoid creating its own decoder stream if the maximum size of -its own dynamic table is zero. +An endpoint MAY choose not to create a decoder stream if its decoder sets the +maximum capacity of the dynamic table to zero. -An endpoint MUST allow its peer to create both encoder and decoder streams +An endpoint MUST allow its peer to create both the encoder and decoder streams even if the connection's settings prevent their use. ## Encoder Instructions {#encoder-instructions} @@ -741,20 +746,16 @@ the existing entry is represented as an integer with a 5-bit prefix. ~~~~~~~~~~ {:#fig-index-with-duplication title="Duplicate"} -The existing entry is re-inserted into the dynamic table without resending -either the name or the value. This is useful to mitigate the eviction of older -entries which are frequently referenced, both to avoid the need to resend the -header and to avoid the entry in the table blocking the ability to insert new -headers. +The existing entry is re-inserted into the dynamic table. This is useful to +avoid adding a reference to an older entry, which might block inserting new +entries. ## Decoder Instructions {#decoder-instructions} -Decoder instructions provide information used to ensure consistency of the -dynamic table. They are sent from the decoder to the encoder on a decoder -stream; that is, the server informs the client about the processing of the -client's header blocks and table updates, and the client informs the server -about the processing of the server's header blocks and table updates. +A decoder sends decoder instructions on the decoder stream to inform the encoder +about the processing of header blocks and table updates to ensure consistency of +the dynamic table. This section specifies the following decoder instructions. @@ -814,7 +815,7 @@ cause a stream to become blocked, as described in {{state-synchronization}}. ~~~~~~~~~~ {:#fig-size-sync title="Insert Count Increment"} -An encoder that receives an Increment field equal to zero or one that increases +An encoder that receives an Increment field equal to zero, or one that increases the Known Received Count beyond what the encoder has sent MUST treat this as a connection error of type `HTTP_QPACK_DECODER_STREAM_ERROR`. @@ -830,10 +831,8 @@ modifying it. Each header block is prefixed with two integers. The Required Insert Count is encoded as an integer with an 8-bit prefix after the encoding described in -{{ric}}). The Base is encoded as sign-and-modulus integer, using a single sign -bit and a value with a 7-bit prefix (see {{base}}). - -These two values are followed by representations for compressed headers. +{{ric}}). The Base is encoded as a sign bit, and a Delta Base value with a +7-bit prefix (see {{base}}). ~~~~~~~~~~ drawing 0 1 2 3 4 5 6 7 @@ -915,11 +914,14 @@ value of 3 indicates that the Required Insert Count is 9 for the header block. The `Base` is used to resolve references in the dynamic table as described in {{relative-indexing}}. -To save space, the Base is encoded relative to the Insert Count using a one-bit -sign and the `Delta Base` value. A sign bit of 0 indicates that the Base is -greater than or equal to the value of the Insert Count; the value of Delta Base -is added to the Insert Count to determine the value of the Base. A sign bit of -1 indicates that the Base is less than the Insert Count. That is: +To save space, the Base is encoded relative to the Required Insert Count using a +one-bit sign and the `Delta Base` value. A sign bit of 0 indicates that the +Base is greater than or equal to the value of the Required Insert Count; the +decoder adds the value of Delta Base to the Required Insert Count to determine +the value of the Base. A sign bit of 1 indicates that the Base is less than the +Required Insert Count; the decoder subtracts the value of Delta Base from the +Required Insert Count and also subtracts one to determine the value of the Base. +That is: ~~~ if S == 0: @@ -937,11 +939,11 @@ entries, the Base will be greater than the Required Insert Count, so the delta will be positive and the sign bit is set to 0. An encoder that produces table updates before encoding a header block might set -Required Insert Count and the Base to the same value. In such case, both the -sign bit and the Delta Base will be set to zero. +Base to the value of Required Insert Count. In such case, both the sign bit and +the Delta Base will be set to zero. A header block that does not reference the dynamic table can use any value for -the Base; setting Delta Base to zero is the most efficient encoding. +the Base; setting Delta Base to zero is one of the most efficient encodings. For example, with a Required Insert Count of 9, a decoder receives a S bit of 1 and a Delta Base of 2. This sets the Base to 6 and enables post-base indexing @@ -952,10 +954,8 @@ entry. ### Indexed Header Field -An indexed header field representation identifies an entry in either the static -table or the dynamic table and causes that header field to be added to the -decoded header list, as described in Section 3.2 of [RFC7541]. - +An indexed header field instruction identifies an entry in either the static +table or the dynamic table and causes that header field to be emitted. ~~~~~~~~~~ drawing 0 1 2 3 4 5 6 7 @@ -993,7 +993,7 @@ field, represented as an integer with a 4-bit prefix (see Section 5.1 of ### Literal Header Field With Name Reference {#literal-name-reference} -A literal header field with a name reference represents a header where the +A literal header field with name reference represents a header field where the header field name matches the header field name of an entry stored in the static table or the dynamic table. @@ -1119,7 +1119,7 @@ HTTP_QPACK_DECODER_STREAM_ERROR (0x202): # Security Considerations -TBD. +TBD. Also see Section 7.1 of [RFC7541]. # IANA Considerations From c049ed1fbfedda303ef6ca024982f503bdbc3b08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Wed, 31 Jul 2019 13:06:53 -0400 Subject: [PATCH 2/8] Do not unnecessarily change "avoid" to "choose not". --- draft-ietf-quic-qpack.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/draft-ietf-quic-qpack.md b/draft-ietf-quic-qpack.md index d4219819c7..a226f45b3f 100644 --- a/draft-ietf-quic-qpack.md +++ b/draft-ietf-quic-qpack.md @@ -632,12 +632,12 @@ type HTTP_WRONG_STREAM_COUNT. These streams MUST NOT be closed. Closure of either unidirectional stream type MUST be treated as a connection error of type HTTP_CLOSED_CRITICAL_STREAM. -An endpoint MAY choose not to create an encoder stream if it's not going to be -used (for example if its encoder doesn't wish to use the dynamic table, or if -the maximum size of the dynamic table permitted by the peer is zero). +An endpoint MAY avoid creating an encoder stream if it's not going to be used +(for example if its encoder doesn't wish to use the dynamic table, or if the +maximum size of the dynamic table permitted by the peer is zero). -An endpoint MAY choose not to create a decoder stream if its decoder sets the -maximum capacity of the dynamic table to zero. +An endpoint MAY avoid creating a decoder stream if its decoder sets the maximum +capacity of the dynamic table to zero. An endpoint MUST allow its peer to create both the encoder and decoder streams even if the connection's settings prevent their use. From 7bc269a3b73015041ad2e8ea95164aff14d64f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Wed, 31 Jul 2019 13:14:34 -0400 Subject: [PATCH 3/8] Do not unnecessarily remove "without resending..." phrase. --- 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 a226f45b3f..a78aca01d6 100644 --- a/draft-ietf-quic-qpack.md +++ b/draft-ietf-quic-qpack.md @@ -746,9 +746,9 @@ the existing entry is represented as an integer with a 5-bit prefix. ~~~~~~~~~~ {:#fig-index-with-duplication title="Duplicate"} -The existing entry is re-inserted into the dynamic table. This is useful to -avoid adding a reference to an older entry, which might block inserting new -entries. +The existing entry is re-inserted into the dynamic table without resending +either the name or the value. This is useful to avoid adding a reference to an +older entry, which might block inserting new entries. ## Decoder Instructions {#decoder-instructions} From 0ca3bf7d6dddc32879371691c6eccc2666f88210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Mon, 19 Aug 2019 10:50:34 -0400 Subject: [PATCH 4/8] Apply suggestions from code review Co-Authored-By: Mike Bishop --- 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 a78aca01d6..456ca6c26c 100644 --- a/draft-ietf-quic-qpack.md +++ b/draft-ietf-quic-qpack.md @@ -279,7 +279,7 @@ encoder becoming blocked on congestion or flow control limits. The Known Received Count is the total number of dynamic table insertions and duplications acknowledged by the decoder. The encoder tracks the Known Received -Count in order to identify which dynamic table entries can be references without +Count in order to identify which dynamic table entries can be referenced without potentially blocking a stream. The decoder tracks the Known Received Count in order to be able to send Insert Count Increment instructions (see {{insert-count-increment}}). @@ -451,7 +451,7 @@ the table size is less than or equal to the table capacity. Another option is to first evict entries until the size of the dynamic table is less than or equal to (table capacity - size of new entry), then add the new entry. Note that a new entry can reference an entry in the dynamic table that will be evicted when -adding this new entry. Therefore implementations utilizing the latter option +adding this new entry. Therefore, implementations utilizing the latter option are cautioned to avoid deleting the referenced name or value if the referenced entry is evicted from the dynamic table prior to inserting the new entry. @@ -831,7 +831,7 @@ modifying it. Each header block is prefixed with two integers. The Required Insert Count is encoded as an integer with an 8-bit prefix after the encoding described in -{{ric}}). The Base is encoded as a sign bit, and a Delta Base value with a +{{ric}}). The Base is encoded as a sign bit and a Delta Base value with a 7-bit prefix (see {{base}}). ~~~~~~~~~~ drawing From d29333ebc1ac11a02c5835d821a1d8cc5a939e9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Mon, 19 Aug 2019 10:53:59 -0400 Subject: [PATCH 5/8] MikeBishop's wording suggestion for allowing creation of an encoder stream and a decoder stream. --- draft-ietf-quic-qpack.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-quic-qpack.md b/draft-ietf-quic-qpack.md index 456ca6c26c..5aff9acd10 100644 --- a/draft-ietf-quic-qpack.md +++ b/draft-ietf-quic-qpack.md @@ -639,7 +639,7 @@ maximum size of the dynamic table permitted by the peer is zero). An endpoint MAY avoid creating a decoder stream if its decoder sets the maximum capacity of the dynamic table to zero. -An endpoint MUST allow its peer to create both the encoder and decoder streams +An endpoint MUST allow its peer to create an encoder stream and a decoder stream even if the connection's settings prevent their use. ## Encoder Instructions {#encoder-instructions} From 6d0da2315f5c8fbb2321389a92ddbdaf0fe8a652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Wed, 16 Oct 2019 10:15:36 -0400 Subject: [PATCH 6/8] indexed header field representation --- draft-ietf-quic-qpack.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/draft-ietf-quic-qpack.md b/draft-ietf-quic-qpack.md index a0754aa3d2..9654d166ae 100644 --- a/draft-ietf-quic-qpack.md +++ b/draft-ietf-quic-qpack.md @@ -969,8 +969,9 @@ entry. ### Indexed Header Field -An indexed header field instruction identifies an entry in either the static -table or the dynamic table and causes that header field to be emitted. +An indexed header field representation identifies an entry in either the static +table or the dynamic table and causes that header field to be added to the +decoded header list. ~~~~~~~~~~ drawing 0 1 2 3 4 5 6 7 From 8e11662efb954f27c8f350780b48964e614386d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Wed, 16 Oct 2019 10:18:34 -0400 Subject: [PATCH 7/8] eviction when adding a new entry --- draft-ietf-quic-qpack.md | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/draft-ietf-quic-qpack.md b/draft-ietf-quic-qpack.md index 9654d166ae..54934d6665 100644 --- a/draft-ietf-quic-qpack.md +++ b/draft-ietf-quic-qpack.md @@ -444,22 +444,18 @@ encoder sends a Set Dynamic Table Capacity instruction ({{set-dynamic-capacity}}) with a non-zero capacity to begin using the dynamic table. -When a new entry is added to the dynamic table, the minimum number of entries -are evicted from the end of the dynamic table so that the final table size -including the new entry does not exceed the table capacity. This can be -achieved by adding the new entry and then removing entries from the end until -the table size is less than or equal to the table capacity. Another option is -to first evict entries until the size of the dynamic table is less than or equal -to (table capacity - size of new entry), then add the new entry. Note that a -new entry can reference an entry in the dynamic table that will be evicted when -adding this new entry. Therefore, implementations utilizing the latter option -are cautioned to avoid deleting the referenced name or value if the referenced -entry is evicted from the dynamic table prior to inserting the new entry. - -The encoder MUST NOT cause a blocking dynamic table entry to be evicted (see -{{blocked-insertion}}). It is an error if the encoder attempts to add an entry -that is larger than the dynamic table capacity; the decoder MUST treat this as a -connection error of type `HTTP_QPACK_ENCODER_STREAM_ERROR`. +Before a new entry is added to the dynamic table, entries are evicted from the +end of the dynamic table until the size of the dynamic table is less than or +equal to (table capacity - size of new entry). The encoder MUST NOT cause a +blocking dynamic table entry to be evicted (see {{blocked-insertion}}). The new +entry is then added to the table. It is an error if the encoder attempts to add +an entry that is larger than the dynamic table capacity; the decoder MUST treat +this as a connection error of type `HTTP_QPACK_ENCODER_STREAM_ERROR`. + +A new entry can reference an entry in the dynamic table that will be evicted +when adding this new entry into the dynamic table. Implementations are +cautioned to avoid deleting the referenced name or value if the referenced entry +is evicted from the dynamic table prior to inserting the new entry. Whenever the dynamic table capacity is reduced by the encoder (see {{set-dynamic-capacity}}), entries are evicted from the end of the dynamic table From 11edccf6ed3697ba785578712b54a42051bb090d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Wed, 16 Oct 2019 14:03:36 -0400 Subject: [PATCH 8/8] Add word inclusive. --- draft-ietf-quic-qpack.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/draft-ietf-quic-qpack.md b/draft-ietf-quic-qpack.md index 54934d6665..e46336951e 100644 --- a/draft-ietf-quic-qpack.md +++ b/draft-ietf-quic-qpack.md @@ -604,8 +604,8 @@ table from Appendix B of [RFC7541] is used without modification. This document expands the definition of string literals and permits them to begin other than on a byte boundary. An "N-bit prefix string literal" begins with the same Huffman flag, followed by the length encoded as an (N-1)-bit -prefix integer. The prefix size, N, can have a value between 2 and 8. The -remainder of the string literal is unmodified. +prefix integer. The prefix size, N, can have a value between 2 and 8 inclusive. +The remainder of the string literal is unmodified. A string literal without a prefix length noted is an 8-bit prefix string literal and follows the definitions in [RFC7541] without modification.