Re: QPACK proposal: wrap absolute index values

Dmitri Tikhonov <dtikhonov@litespeedtech.com> Mon, 06 August 2018 04:46 UTC

Return-Path: <dtikhonov@litespeedtech.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 43417130E88 for <quic@ietfa.amsl.com>; Sun, 5 Aug 2018 21:46:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.911
X-Spam-Level:
X-Spam-Status: No, score=-1.911 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=litespeedtech-com.20150623.gappssmtp.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 dB__yQ3Fcf63 for <quic@ietfa.amsl.com>; Sun, 5 Aug 2018 21:46:31 -0700 (PDT)
Received: from mail-qt0-x22a.google.com (mail-qt0-x22a.google.com [IPv6:2607:f8b0:400d:c0d::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C5CBB130DBE for <quic@ietf.org>; Sun, 5 Aug 2018 21:46:30 -0700 (PDT)
Received: by mail-qt0-x22a.google.com with SMTP id y5-v6so12414227qti.12 for <quic@ietf.org>; Sun, 05 Aug 2018 21:46:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=litespeedtech-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=KSesSdln/aPfn/pgte34Y5grhcW4MCCsYmjDC3mkRUw=; b=OD6+lec4vp14gUkEmo31LBaBLm18yrM8HyASZZEo04uyYIZKlcjrloi4qLl92oJKd3 0bDOg3g11wrIfFvrmisbuJnuoDtDC4YhfNb/RJbKAWtl+KIu/8WblGS3fbl0ACIqxkvo kdLr8KkNKw6qvRs1RA3Sl9ODrD4VSR+nIcHT5gHEkf2uWr/T8Nzc/4amHGdBoUrxXAE1 iFkkdWZoPnIJ9dgA0CbgNIQbBEM57ABM7Np8If9KAmQmkHzD9qWmk7pohPvtJ6iJqJgW qnQ6QCyk91RmY77MejnCzMyAIhOwjIFFNeID9brqi5Ug3tyV3WMZQmIhNSUVzSeHxT9H sKxw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=KSesSdln/aPfn/pgte34Y5grhcW4MCCsYmjDC3mkRUw=; b=GrbvGtrNGOxokKcRXh+ilKOpFAUnHLlz7FzVvYEr/YQZ1ohzGFy1WJ4LWFMDRlejWX OVOUuvylUWVGMFMZFAim+YJmjClsHmc39qicUi/0OG9GLfkC8iDL6w/EnsNsBVxlxJaH H4Z+3xWtfU/iDibhBgqUQESmoUlT6x2HDjvqvzDmB+p8z2qi+36r+RSmt9SeoZYVkqFx IGTK9Pl11HK2rIw/R0LDCcsR9TNmTtNck6hfArJk31T5AAu5mzz/1Wdme86dU27hYXj0 WXC2ac1d6pWcDkxXckmkZVMYs5X4hhOGFS9fjio0v3FnyL/z+PsrfGRwdofxs89/kiVL BSjA==
X-Gm-Message-State: AOUpUlHIJ0YWUGywqzE3ECwqbo7JYnGir/1K75afqAHV1U1VhXTet9h+ KjwnznA+wjLq6EDKHDobvEXrUjH9zqw=
X-Google-Smtp-Source: AAOMgpcg4ylsbmsLkJ1O0RgtXE/Qjp3JweBg/GY0RjZFKeokxyWPZA9hZ1YS7Iz6fPubFUA58ON+OQ==
X-Received: by 2002:ac8:26ee:: with SMTP id 43-v6mr13081597qtp.274.1533530790055; Sun, 05 Aug 2018 21:46:30 -0700 (PDT)
Received: from ubuntu-dmitri (ool-44c1d219.dyn.optonline.net. [68.193.210.25]) by smtp.gmail.com with ESMTPSA id i24-v6sm10133665qti.28.2018.08.05.21.46.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Aug 2018 21:46:29 -0700 (PDT)
Date: Mon, 6 Aug 2018 00:46:27 -0400
From: Dmitri Tikhonov <dtikhonov@litespeedtech.com>
To: Martin Thomson <martin.thomson@gmail.com>, QUIC WG <quic@ietf.org>
Subject: Re: QPACK proposal: wrap absolute index values
Message-ID: <20180806044626.GD25402@ubuntu-dmitri>
Mail-Followup-To: Martin Thomson <martin.thomson@gmail.com>, QUIC WG <quic@ietf.org>
References: <20180805154649.GA14245@ubuntu-dmitri> <CABkgnnV2Ugu6O_6Q8grjhQiqavUe6P8FVP_BNRuNqtzVXTbOgw@mail.gmail.com> <20180806043610.GC25402@ubuntu-dmitri>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20180806043610.GC25402@ubuntu-dmitri>
User-Agent: Mutt/1.5.24 (2015-08-30)
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/FIcoDBhGfL9Z3DooyJJqiH0Ea1c>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Aug 2018 04:46:32 -0000

Bug fix:

      bool
      isHeaderBlocked (unsigned LargestRef)
      {
          if (CurMax <= MaxEntries)
              return LargestRef > CurMax
                                  && LargestRef <= CurMax + MaxEntries;
          else
              return !(LargestRef <= CurMax
-                                 && LargestRef > CurMax - MaxEntries + 1);
+                                 && LargestRef >= CurMax - MaxEntries + 1);
      }