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 EB13B12785F
 for <quic-issues@ietfa.amsl.com>; Fri, 28 Sep 2018 06:13:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.456
X-Spam-Level: 
X-Spam-Status: No, score=-8.456 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.456, 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 sGGMAB0PcFfs for <quic-issues@ietfa.amsl.com>;
 Fri, 28 Sep 2018 06:13:43 -0700 (PDT)
Received: from out-7.smtp.github.com (out-7.smtp.github.com [192.30.252.198])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by ietfa.amsl.com (Postfix) with ESMTPS id D99C5124BE5
 for <quic-issues@ietf.org>; Fri, 28 Sep 2018 06:13:42 -0700 (PDT)
Date: Fri, 28 Sep 2018 06:13:41 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com;
 s=pf2014; t=1538140421;
 bh=gXyjQNMahOxiwc7pd7J/AiVL3XzcLGznNA/TIZZNctw=;
 h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID:
 List-Archive:List-Post:List-Unsubscribe:From;
 b=AaCgk2O73epq0cWxB1dUWWAihu2lpm/0EXVLipMfAAgYde+UMwv3wE5DcF6tCiVuW
 LkPSO6eOv8OhKdAWW8EXPUvbhsWXRxn6b/BkC0bs8ryIaHtI34Lh3jm7AWyxXGIiOd
 KmPdxx/W3BqOMOptH2DcMwSkWcRBCCwZcRJONPHU=
From: Dmitri Tikhonov <notifications@github.com>
Reply-To: quicwg/base-drafts
 <reply+0166e4ab4540ca470b912c5c0b6f621d57313bb1131f723392cf0000000117c5eb0592a169ce1586350b@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/1763/review/159853030@github.com>
In-Reply-To: <quicwg/base-drafts/pull/1763@github.com>
References: <quicwg/base-drafts/pull/1763@github.com>
Subject: Re: [quicwg/base-drafts] QPACK: Encode Largest Reference modulo
 MaxEntries (#1763)
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="--==_mimepart_5bae290591e90_13f33f958a6d45c0135150";
 charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: dtikhonov
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/dlX4PvpC4IhDQJCCgx_VfpZ0Vz4>
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: Fri, 28 Sep 2018 13:13:45 -0000


----==_mimepart_5bae290591e90_13f33f958a6d45c0135150
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

dtikhonov commented on this pull request.



> -safe to process the rest of the block.
+safe to process the rest of the block.  If Largest Reference is greater than
+zero, the encoder transforms it as follows before encoding:
+
+~~~
+   LargestReference = LargestReference mod 2*MaxEntries + 1
+~~~
+
+The decoder reconstructs the Largest Reference using the following algorithm:
+
+~~~
+   if LargestReference > 0:
+      LargestReference -= 1
+      CurrentWrapped = TableLargestAbsoluteIndex mod 2*MaxEntries
+
+      if CurrentWrapped >= LargestReference + MaxEntries:

It seems this range is one too long: `[ LargestReference - MaxEntries, LargestReference + MaxEntries ]` is `2 * MaxEntries + 1` long, while the actual valid range is at most `2 * MaxEntries`.  I don't yet know whether this is a problem, as I have to get used to this version of the logic.

-- 
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/1763#pullrequestreview-159853030
----==_mimepart_5bae290591e90_13f33f958a6d45c0135150
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

<p><b>@dtikhonov</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/quicwg/base-drafts/pull/1763#discussion_r221247551">draft-ietf-quic-qpack.md</a>:</p>
<pre style='color:#555'>&gt; -safe to process the rest of the block.
+safe to process the rest of the block.  If Largest Reference is greater than
+zero, the encoder transforms it as follows before encoding:
+
+~~~
+   LargestReference = LargestReference mod 2*MaxEntries + 1
+~~~
+
+The decoder reconstructs the Largest Reference using the following algorithm:
+
+~~~
+   if LargestReference &gt; 0:
+      LargestReference -= 1
+      CurrentWrapped = TableLargestAbsoluteIndex mod 2*MaxEntries
+
+      if CurrentWrapped &gt;= LargestReference + MaxEntries:
</pre>
<p>It seems this range is one too long: <code>[ LargestReference - MaxEntries, LargestReference + MaxEntries ]</code> is <code>2 * MaxEntries + 1</code> long, while the actual valid range is at most <code>2 * MaxEntries</code>.  I don't yet know whether this is a problem, as I have to get used to this version of the logic.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/quicwg/base-drafts/pull/1763#pullrequestreview-159853030">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AWbkq2E5h47ojpKvuJgcMpl61pdAvIlaks5ufiCFgaJpZM4WtE17">mute the thread</a>.<img src="https://github.com/notifications/beacon/AWbkq9SRwgG_mhF6xCbFFbzFfjMecsoBks5ufiCFgaJpZM4WtE17.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/quicwg/base-drafts","title":"quicwg/base-drafts","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/quicwg/base-drafts"}},"updates":{"snippets":[{"icon":"PERSON","message":"@dtikhonov commented on #1763"}],"action":{"name":"View Pull Request","url":"https://github.com/quicwg/base-drafts/pull/1763#pullrequestreview-159853030"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/quicwg/base-drafts/pull/1763#pullrequestreview-159853030",
"url": "https://github.com/quicwg/base-drafts/pull/1763#pullrequestreview-159853030",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "@dtikhonov commented on 1763",
"sections": [
{
"text": "",
"activityTitle": "**Dmitri Tikhonov**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@dtikhonov",
"facts": [

]
}
],
"potentialAction": [
{
"targets": [
{
"os": "default",
"uri": "https://github.com/quicwg/base-drafts/pull/1763#pullrequestreview-159853030"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 380915067\n}"
}
],
"themeColor": "26292E"
}
]</script>
----==_mimepart_5bae290591e90_13f33f958a6d45c0135150--

