Re: Payload length 0

Dmitri Tikhonov <dtikhonov@litespeedtech.com> Fri, 18 May 2018 13:44 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 7224312D95F for <quic@ietfa.amsl.com>; Fri, 18 May 2018 06:44:09 -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 jb4YbaJJqbwy for <quic@ietfa.amsl.com>; Fri, 18 May 2018 06:44:07 -0700 (PDT)
Received: from mail-qt0-x22f.google.com (mail-qt0-x22f.google.com [IPv6:2607:f8b0:400d:c0d::22f]) (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 8AEC112D95E for <quic@ietf.org>; Fri, 18 May 2018 06:44:07 -0700 (PDT)
Received: by mail-qt0-x22f.google.com with SMTP id h2-v6so10283348qtp.7 for <quic@ietf.org>; Fri, 18 May 2018 06:44:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=litespeedtech-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=qd13B0wvou3IoyNsYGcpCYLSITYag5nrhi9pGGxxaMc=; b=nXrb9aPLod4Kv+NF+vpu+d7Cl5hCPy6CrILHM7+tE9pwiu3A3wcOTwN5rSmdvFDMN7 xf5WJY06K0k9Q+ph35+jjwE6bGVTBu52EGlovintn1OK61M2tcMARZ0yvb6gDRekGh2I GWrMLhmlLZX72MXV/z06L/g1hpBPg5EsUYehU2PNq55Rn5rgMfUlnxwQzeLTpAfWAWEk PwOfw4c3l/FPvAAmw0HbwzJHHn2jpuqTMPxfte63xIXAsTbAhUfmE/yd+TFfbtTwHo3b 9K1n0+0qTCYZd27e8GDBKJIy8S/tvx1f1zepPTkc1qx22O16MNqjpKodapT952N+jiTs Ey8A==
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:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=qd13B0wvou3IoyNsYGcpCYLSITYag5nrhi9pGGxxaMc=; b=EE228qAReENcacOZY4v3Acgf8tAU//04+eWKmoGuSo0x8biGICQ6Lu9O1lEVXnEVVi ktWatvNkh9p1jcL8ZSfof6YhTEksmhApNvOlP0P2QECU0Fh2MhP39fmaisFt6WL1Pn8h 7YrVwWpYTbPwH/6oVXyBCU+TZ25uIvGy+p/0rWpBlNoygV0j44NYnl5bH6tXm/iLf13K tYA/ow/AV4zCgO5XhCQ15AxJZ7GKdVEgYAWSJCcp5Z3RBh6qTb5JX8hGZ5GNcttcmn79 WeKz1F6ilSj1RoIx22wJr1ZZ7FewGwksj4YhF3uzFgj2ZYyUj6O5H+n+mwWMmGJ5bHjQ iKeA==
X-Gm-Message-State: ALKqPwethHzCjkFrkLBZSESOOTT9gRamEOQ1rSkL4MBz3/hvY3vM7Ke/ GZynw4MAvdYbCU7Oy9js5MWXbQ==
X-Google-Smtp-Source: AB8JxZoLaMwfgyA0YGBkZ8XBQhsJw7M6SeIgjxzTr2vPKS6+7Fp3W3yYOQdRvEPA3LdHKZ+8SXFZvw==
X-Received: by 2002:ac8:41e:: with SMTP id v30-v6mr9687950qtg.270.1526651046570; Fri, 18 May 2018 06:44:06 -0700 (PDT)
Received: from ubuntu-dmitri (ool-2f1636b6.static.optonline.net. [47.22.54.182]) by smtp.gmail.com with ESMTPSA id f82-v6sm5771815qkh.73.2018.05.18.06.44.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 May 2018 06:44:06 -0700 (PDT)
Date: Fri, 18 May 2018 09:44:01 -0400
From: Dmitri Tikhonov <dtikhonov@litespeedtech.com>
To: Ian Swett <ianswett@google.com>
Cc: Martin Thomson <martin.thomson@gmail.com>, Marten Seemann <martenseemann@gmail.com>, IETF QUIC WG <quic@ietf.org>
Subject: Re: Payload length 0
Message-ID: <20180518134400.GA12617@ubuntu-dmitri>
Mail-Followup-To: Ian Swett <ianswett@google.com>, Martin Thomson <martin.thomson@gmail.com>, Marten Seemann <martenseemann@gmail.com>, IETF QUIC WG <quic@ietf.org>
References: <CAOYVs2q63DpkPZTbw9T24ZcFOxbvrWAGvOtUaHvCuSg_13pSkQ@mail.gmail.com> <CABkgnnWpgyN_OPac-uSKALEaVc8mO_LpT9gAOs-n1eKqso5QAQ@mail.gmail.com> <CAKcm_gMFumNgPq4FxwcgzgDUCvn_jUxb0qk7tAgYZ=LvKfxjfg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CAKcm_gMFumNgPq4FxwcgzgDUCvn_jUxb0qk7tAgYZ=LvKfxjfg@mail.gmail.com>
User-Agent: Mutt/1.5.24 (2015-08-30)
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/nEGyOZRXFooglOOOBRY9D1H8ppU>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.22
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: Fri, 18 May 2018 13:44:10 -0000

I agree with Martin and Ian.  We should keep the payload length field
and its value should be the actual length of the payload.

In addition to being simple, this allows some flexibility when packet
generattion is far away (in time or code) from actually sending a
packet.  That is to say, it is easier not to have to make the decision
which version of the payload length value to use when the packet is
created.

  - Dmitri.

On Fri, May 18, 2018 at 08:06:01AM -0400, Ian Swett wrote:
> I would also prefer to not do either of these, because I think it adds
> complexity and the byte savings are tiny.
> 
> On Fri, May 18, 2018 at 1:34 AM Martin Thomson <martin.thomson@gmail.com>
> wrote:
> 
> > Having just implemented this (and gotten it wrong once), I don't want more
> > special cases.  Both of these options need extra code.  As Kazuho points
> > out, filling in a two octet length is trivial.
> >
> > It's true that a length of 0 is invalid, but so is 1 through 16.
> >
> > Yes, this saves an octet, on about 4 packets per connection in the common
> > case, more like 2 if you actually take advantage of compound packets.
> > On Fri, May 18, 2018 at 3:08 PM Marten Seemann <martenseemann@gmail.com>
> > wrote:
> >
> > > Jana asked me to raise this issue on the list, after we already had a bit
> > of discussion in https://github.com/quicwg/base-drafts/pull/1301.
> >
> > > The proposal is to make a payload length of 0 a special value, indicating
> > that the packet is not a coalesced packet, i.e. that the whole payload of
> > the UDP packet is the QUIC packet. This would eliminate an invalid value of
> > the payload length (there are no empty packets), save one byte for packet
> > lengths where varint encoding would result in a two byte number, and
> > apparently also simplify (some) implementations.
> >
> > > Kazuho argued creating two versions of each Long Header type (one with
> > and one without a payload length) is the better solution, since all values
> > below the AEAD tag length + 1 are invalid values anyway, and it would save
> > one more byte.
> >
> > > We should make a decision if and what we want to do about this.
> >
> >