Re: [quicwg/base-drafts] Use "Insert Count" rather than "Largest Reference" (#2111)

Martin Thomson <notifications@github.com> Wed, 19 December 2018 03:56 UTC

Return-Path: <noreply@github.com>
X-Original-To: quic-issues@ietfa.amsl.com
Delivered-To: quic-issues@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A728F12D84D for <quic-issues@ietfa.amsl.com>; Tue, 18 Dec 2018 19:56:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.065
X-Spam-Level:
X-Spam-Status: No, score=-8.065 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.065, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=github.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y_PTbVx9YBr4 for <quic-issues@ietfa.amsl.com>; Tue, 18 Dec 2018 19:56:16 -0800 (PST)
Received: from out-11.smtp.github.com (out-11.smtp.github.com [192.30.254.194]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 413621276D0 for <quic-issues@ietf.org>; Tue, 18 Dec 2018 19:56:16 -0800 (PST)
Date: Tue, 18 Dec 2018 19:56:15 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1545191775; bh=81y51pNuy+o/WfmW8pY3otZtOxYRluv0mT0Levij6SE=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=eFqpnCzzFjFy5H0/Qg40KcprSPpl5yArQONfCm/7A0V2+lrDHlYgMLiJlQXVreLxj WOAm05h/ontXBHy59dH/fGtRsZ2BdAmSS3i5WIz4KgfMKucms2hZZygl8XTXC+vPrE 9sjXuO8LNvUyuMwNnfVaky8Lotp3ZQxTNQVmWYQw=
From: Martin Thomson <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4ab52fea6af37821673a35ac98f875a373f948d98a592cf000000011831835f92a169ce17392ee3@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/2111/review/186377587@github.com>
In-Reply-To: <quicwg/base-drafts/pull/2111@github.com>
References: <quicwg/base-drafts/pull/2111@github.com>
Subject: Re: [quicwg/base-drafts] Use "Insert Count" rather than "Largest Reference" (#2111)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5c19c15f6dc81_63913fab9d8d45b8126240"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: martinthomson
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/qSYXGkAA8tMwLB-svDIItJKOXbI>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.29
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic-issues/>
List-Post: <mailto:quic-issues@ietf.org>
List-Help: <mailto:quic-issues-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 19 Dec 2018 03:56:19 -0000

martinthomson commented on this pull request.

We never say whether we are using 0-based or 1-based indexing, but in using the term, we implicitly established that we use 1-based indexing.  Except that the draft is inconsistent throughout.  The static table starts at 0, relative indexing is 0-based (ish), but the largest reference is implicitly 1-based.  If I want to refer to the first entry, I send a 1. 

That's very confusing.  To me at least, maybe because I didn't ever internalize the bizarre internal logic that drove HPACK.

Changing to a count means that this is not relevant.  The indexing we do in the draft is all 0-based, as it should be.  But then there is less of a dependency on that because we're counting, not indexing, in the trickiest part.

>  
 In order to identify which dynamic table entries can be safely used
 without a stream becoming blocked, the encoder tracks the absolute index of the
-decoder's Largest Known Received entry.
+decoder's Known Received Count entry.

I failed to update this text.  I will do that.

>  
 n = count of entries inserted
 d = count of entries dropped
 ~~~~~
 {: title="Example Dynamic Table Indexing - Control Stream"}
 
 Because frames from request streams can be delivered out of order with
-instructions on the encoder stream, relative indices are relative to the Base
-Index at the beginning of the header block (see {{header-prefix}}). The Base
-Index is an absolute index. When interpreting the rest of the frame, the entry
-identified by Base Index has a relative index of zero.  The relative indices of
-entries do not change while interpreting headers on a request or push stream.
+instructions on the encoder stream, relative indices are relative to the Base at
+the beginning of the header block (see {{header-prefix}}). The Base is encoded
+as a value relative to the Insert Count, so it can be expressed as the number of
+entries inserted. The dynamic table entries up to the Base can be referenced.

Yeah, I tried to fix this without changing it too much and that turned out badly.  I've a rewrite for you.

>  
 n = count of entries inserted
 d = count of entries dropped
 ~~~~~
 {: title="Example Dynamic Table Indexing - Control Stream"}
 
 Because frames from request streams can be delivered out of order with
-instructions on the encoder stream, relative indices are relative to the Base
-Index at the beginning of the header block (see {{header-prefix}}). The Base
-Index is an absolute index. When interpreting the rest of the frame, the entry
-identified by Base Index has a relative index of zero.  The relative indices of
-entries do not change while interpreting headers on a request or push stream.
+instructions on the encoder stream, relative indices are relative to the Base at
+the beginning of the header block (see {{header-prefix}}). The Base is encoded
+as a value relative to the Insert Count, so it can be expressed as the number of
+entries inserted. The dynamic table entries up to the Base can be referenced.
+The most recently inserted entry within the limit set by the Base has a relative
+index of 0.
+
+Though new entries could be added while processing a header block, the relative
+indices of entries do not change.

I was referring to parallel processing.  My implementation allows for that possibility.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/2111#pullrequestreview-186377587