From 346d3e3cffb950b168162c656914b4d52121ccd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Thu, 3 Oct 2019 10:07:39 -0400 Subject: [PATCH 1/3] Fix bug in Insert Count Increment description. Fixes issue 3082. This PR fixes the race condition and clarifies that both endpoints must keep track of the Known Received Count. --- draft-ietf-quic-qpack.md | 47 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/draft-ietf-quic-qpack.md b/draft-ietf-quic-qpack.md index 35ca5da89b..bf88cfa1bf 100644 --- a/draft-ietf-quic-qpack.md +++ b/draft-ietf-quic-qpack.md @@ -279,27 +279,25 @@ 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 -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 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}}). +### 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. +The Known Received Count is the total number of acknowledged dynamic table +insertions and duplications. It is updated using Header Acknowledgement +and Insert Count Increment instructions. The encoder keeps track of the Known +Received Count in order to know which entries can be referenced without the risk +of blocking. The decoder keeps track of the Known Received Count in order to be +able to send Insert Count Increment instructions. -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 -streams, the decoder sends an Insert Count Increment instruction (see -{{insert-count-increment}}). +A Header Acknowledgement instruction ({{header-acknowledgement}}) implies that +the decoder has received all dynamic table state necessary to process +corresponding the header block. If the Required Insert Count of the +acknowledged header block is greater than the current Known Received Count, +Known Received Count is updated to the value of the Required Insert Count. +An Insert Count Increment instruction {{insert-count-increment}} increases the +Known Received Count by its Increment parameter. See {{new-table-entries}} for +guidance. ## Decoder @@ -782,6 +780,9 @@ stream on which every header block with a non-zero Required Insert Count has already been acknowledged, that MUST be treated as a connection error of type `HTTP_QPACK_DECODER_STREAM_ERROR`. +The Header Acknowledgement instruction might increase the Known Received Count, +see {{known-received-count}}. + ### Stream Cancellation @@ -803,13 +804,11 @@ This instruction is used as described in {{state-synchronization}}. ### Insert Count Increment The Insert Count Increment instruction begins with the '00' two-bit pattern, -followed by the Increment encoded as a 6-bit prefix integer. The value of the -Increment is the total number of dynamic table insertions and duplications -processed by the decoder since the last time it sent a Header Acknowledgement -instruction that increased the Known Received Count (see -{{known-received-count}}) or an Insert Count Increment instruction. The encoder -uses this value to update the Known Received Count, as described in -{{state-synchronization}}. +followed by the Increment encoded as a 6-bit prefix integer. This instruction +increases the Known Received Count (see {{known-received-count}}) by the value +of the Increment parameter. The decoder should send an Increment value that +increases the Known Received Count to the total number of dynamic table +insertions and duplications processed so far. ~~~~~~~~~~ drawing 0 1 2 3 4 5 6 7 From de3609e466c114100b25fe6850bb2ba12932c78b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Wed, 30 Oct 2019 11:55:30 -0400 Subject: [PATCH 2/3] Revert some changes. --- draft-ietf-quic-qpack.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/draft-ietf-quic-qpack.md b/draft-ietf-quic-qpack.md index bf88cfa1bf..fed670c725 100644 --- a/draft-ietf-quic-qpack.md +++ b/draft-ietf-quic-qpack.md @@ -282,12 +282,11 @@ encoder becoming blocked on congestion or flow control limits. ### Known Received Count -The Known Received Count is the total number of acknowledged dynamic table -insertions and duplications. It is updated using Header Acknowledgement -and Insert Count Increment instructions. The encoder keeps track of the Known -Received Count in order to know which entries can be referenced without the risk -of blocking. The decoder keeps track of the Known Received Count in order to be -able to send Insert Count Increment instructions. +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 referenced without +potentially blocking a stream. The decoder tracks the Known Received Count in +order to be able to send Insert Count Increment instructions. A Header Acknowledgement instruction ({{header-acknowledgement}}) implies that the decoder has received all dynamic table state necessary to process From 3bf0738a3b356a35d7461ca350a3c9e71ff61152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Wed, 30 Oct 2019 11:56:15 -0400 Subject: [PATCH 3/3] Remove unnecessarily inserted blank line. --- draft-ietf-quic-qpack.md | 1 - 1 file changed, 1 deletion(-) diff --git a/draft-ietf-quic-qpack.md b/draft-ietf-quic-qpack.md index dd3c2dd5f8..676c04f1d7 100644 --- a/draft-ietf-quic-qpack.md +++ b/draft-ietf-quic-qpack.md @@ -279,7 +279,6 @@ 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 The Known Received Count is the total number of dynamic table insertions and