Re: Connection ID lengths 1, 2 and 3
Eric Rescorla <ekr@rtfm.com> Sun, 15 July 2018 17:56 UTC
Return-Path: <ekr@rtfm.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 5DAEC128CF3 for <quic@ietfa.amsl.com>; Sun, 15 Jul 2018 10:56:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.909
X-Spam-Level:
X-Spam-Status: No, score=-1.909 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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=rtfm-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 rqUFTVOWKFlc for <quic@ietfa.amsl.com>; Sun, 15 Jul 2018 10:56:08 -0700 (PDT)
Received: from mail-yw0-x230.google.com (mail-yw0-x230.google.com [IPv6:2607:f8b0:4002:c05::230]) (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 559F4130E42 for <quic@ietf.org>; Sun, 15 Jul 2018 10:56:08 -0700 (PDT)
Received: by mail-yw0-x230.google.com with SMTP id l189-v6so13440999ywb.10 for <quic@ietf.org>; Sun, 15 Jul 2018 10:56:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=pG4ZAzskfHRA2wyuH65UwiVYDOhKyCjmdpHZgcKuU9s=; b=jmmTrcQIp1uWFcf1HDPm4+Aw0O1Loircph1R95Wj3doFq7YrJhYnVLfWT3VJeNpr8o JxC7IwY289C4KYjSm8dwfzmy/OgYw7PXaedAm7y1Z17SaFpLVJkIQiB0QzO4zYd2LpXl o6oY4/WcrMKaStZ1vCaWI47gH73hw2xUQjFLM2u38TSW/sp5sRtKiVzC2/9AY5sEwEzl qxYXoe7qAFuUCj5AtFVp++o531hlBQXIQ8I4u3gT/UqEWM+c4IaDtGKWswzFS44MBrqs r1POnJoN9YfrWn+zXgC3vjr5bZ+WbF5gN7RV76Yysvea3c6+7TmhYkRMKzI+9PQw/VSA A5+Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=pG4ZAzskfHRA2wyuH65UwiVYDOhKyCjmdpHZgcKuU9s=; b=Aap2kx+f06aJ2+4eHSvX4TOYB9AJXHgselZYZcvmKrQgB0nrKsPcg2B/kybnVfZSf/ PNrZ7sU7eQ3NZIUqZPTowro5cEu0+fa0cxMc5kcvPd4JTZrql1zwk5OydaF+cVYEUfmj Vn0Wn5cwl+sezA/wUI2sn8fa8GiNrILzZmeucbwXpdw2msZuqdK7/rg8ibyPk9YWT1zL lDFxOl6xQP5oJB/yV9e9DAuWVBp5jOlu1mU4PYeQHxj3knr7O0Vgcbq4njUZ2lxQNm1R LEKPvhwAf1GYh25EGsvZkdf+Fa29J8rIwbUtJj8qJ3mMEmKQHhKJYzvRMYvk6RZU5r51 LCRw==
X-Gm-Message-State: AOUpUlGGi6SleLsicoNbHGAtcVODphxTfZC11FXhsPIpVRW/umSAU6l/ jvv4VINp3+qzAUiCoyi3jBMxjqZJBd/b650EM0D31Q==
X-Google-Smtp-Source: AAOMgpcLlH7Vt5mANFYk0kOO25JK2yf2o9wg36lh8t9msxNMRYnkO9wBKNOFYzdLqld1N5kimPo/T5lvBjDNw9J5jY8=
X-Received: by 2002:a81:3e02:: with SMTP id l2-v6mr7184931ywa.381.1531677367299; Sun, 15 Jul 2018 10:56:07 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a81:6b83:0:0:0:0:0 with HTTP; Sun, 15 Jul 2018 10:55:26 -0700 (PDT)
In-Reply-To: <4F5BCC2E-4DD0-403F-954A-FB79847E218B@intel.com>
References: <1F436ED13A22A246A59CA374CBC543998B86DF5E@ORSMSX111.amr.corp.intel.com> <CAKcm_gPmp=5pcM-UFWWU4UvNuuCOwbcj7s1=Qb4GW3cGhF3Bbw@mail.gmail.com> <0EA7393D-B7EC-4755-B13E-5177E24AA57A@intel.com> <CAOYVs2q5C370LN4X-xJ4NuMxjt5ALsz4vFwczj6N2j5skvuFKw@mail.gmail.com> <4F5BCC2E-4DD0-403F-954A-FB79847E218B@intel.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Sun, 15 Jul 2018 10:55:26 -0700
Message-ID: <CABcZeBNtYcqYLMs9EHkfNo+=hBi1RhOfP-ikgzLgfBpG4xgJng@mail.gmail.com>
Subject: Re: Connection ID lengths 1, 2 and 3
To: "Deval, Manasi" <manasi.deval@intel.com>
Cc: Marten Seemann <martenseemann@gmail.com>, Ian Swett <ianswett@google.com>, IETF QUIC WG <quic@ietf.org>, Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>
Content-Type: multipart/alternative; boundary="00000000000063bbaa05710d6d1b"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/_XDVR1B6NF84ekmH6U2d4z8ja2c>
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: Sun, 15 Jul 2018 17:56:15 -0000
On Sun, Jul 15, 2018 at 10:04 AM, Deval, Manasi <manasi.deval@intel.com> wrote: > There is a 32bit version number that precedes the length field. Until we > have a thousand versions, we are always sending 3 extra bytes on the wire. > Well, the current version actually has the high bit set. > > Thanks, > Manasi > > On Jul 15, 2018, at 12:52 PM, Marten <martenseemann@gmail.com> wrote: > > I don't think we should reduce the number of sizes available. Sending > bytes on the wire is orders of magnitude more expensive than performing a > simple transformation to a parsed value. I'd prefer if we could discuss > this separately, since this is quite the opposite of what I was originally > proposing. > > To reiterate my argument, changing the invariants such that the values 1, > 2 and 3 can be used would be a big benefit for p2p applications, since they > would be able to use super-short connection IDs. Since this is a change > that requires a change to the invariants, we need to make this decision > very soon, if we want to enable this use case of QUIC. > > On Sun, Jul 15, 2018 at 12:41 PM Deval, Manasi <manasi.deval@intel.com> > wrote: > >> I would still prefer if we can reduce the number of sizes supported. >> >> Could a scheme where we support only 5 cids be used? Use a 3 bit size , >> shift left by 2 and not use the last 2 sizes of 24 and 28. >> >> >> Thanks, >> Manasi >> >> >> >> On Jul 15, 2018, at 10:45 AM, Ian Swett <ianswett@google.com> wrote: >> >> If one uses existing fast crypto primitives to encode connection ID, then >> 16 bytes is a natural size, and there was interest in having an extra byte >> for metadata(key rotation/length signaling/etc). >> >> Unfortunately, that leaves us with a gap somewhere, and a gap at the >> beginning seemed the most natural at the time. >> >> On Sun, Jul 15, 2018 at 10:35 AM Deval, Manasi <manasi.deval@intel.com> >> wrote: >> >>> Another issue I noticed with the size of connection id was with regards >>> to parsing the header field. The current steps are: >>> >>> · Parse DCid length, >>> >>> · Add 3, >>> >>> · Parse DCid length >>> >>> · Add 3, >>> >>> · Read DCID >>> >>> · Read SCID. >>> >>> >>> >>> I really appreciate the fixed size length fields so we can know both >>> destination and source Cid lengths in parallel. Implementing this in >>> hardware has the following challenges though: >>> >>> a. There are 12 unique length types for each of the CiDs. This >>> means either more stages of serial processing, which would be slower. Or it >>> means more logic for parallel processing. >>> >>> b. In addition to this, the arithmetic logic to add 3 is a little >>> more specialized than a logical operation, e...g.shift left. >>> >>> >>> >>> Therefore, I would like to understand the basis for having 12 different >>> lengths and if there is a chance to simplify this logic, we can have a 3 >>> bit length and shift left 1, so we have lengths of 0,2,4… 14. Would the >>> loss of longer CiD values from 15 to 18 be an issue? >>> >>> >>> >>> Thanks, >>> >>> Manasi >>> >>> >>> >>> *From:* QUIC [mailto:quic-bounces@ietf.org] *On Behalf Of *Mikkel >>> Fahnøe Jørgensen >>> *Sent:* Tuesday, July 03, 2018 6:06 AM >>> *To:* QUIC WG <quic@ietf.org>; Marten Seemann <martenseemann@gmail.com> >>> *Subject:* Re: Connection ID lengths 1, 2 and 3 >>> >>> >>> >>> That is correct. Especially in low-power sensor mesh networks. >>> >>> >>> >>> >>> >>> On 3 July 2018 at 14.45.30, Marten Seemann (martenseemann@gmail.com) >>> wrote: >>> >>> First of all, I realise that I'm bringing this up late in the process, >>> and maybe too late, since this would require a change to the invariants. >>> >>> >>> >>> The connection IDs can be either 0 bytes or anything between 4 and 18 >>> bytes (inclusive). Lengths of 1, 2 and 3 bytes are not possible. >>> >>> For p2p applications, and for server deployments that are not doing >>> connection ID based load balancing, it would be interesting to use shorter >>> connection IDs. One might imagine that a peer encodes the length of the >>> connection ID into the first few bits, and then starts using 1 byte >>> connection IDs first, and successively moves to longer lengths only when >>> handling more connections. A p2p host handling several thousand >>> simultaneous connections (which will be enough for many p2p protocols) >>> would never have to use anything longer than 2 byte connection IDs. >>> >>> >>> >>> In the connection ID length field in the Long Header, we only have to 4 >>> bit to encode a range of 19 values (we want 0 byte connection IDs, and we >>> want to support 18 byte connection IDs), so *some* values have to be left >>> out. However, leaving out 1, 2 and 3 seems a bit unfortunate, as there will >>> be more use cases for these values than e.g. for 13, 14 and 15 bytes. >>> >>>
- Re: Connection ID lengths 1, 2 and 3 Mikkel Fahnøe Jørgensen
- Connection ID lengths 1, 2 and 3 Marten Seemann
- RE: Connection ID lengths 1, 2 and 3 Deval, Manasi
- Re: Connection ID lengths 1, 2 and 3 Ian Swett
- Re: Connection ID lengths 1, 2 and 3 Deval, Manasi
- Re: Connection ID lengths 1, 2 and 3 Marten Seemann
- Re: Connection ID lengths 1, 2 and 3 Deval, Manasi
- Re: Connection ID lengths 1, 2 and 3 Mikkel Fahnøe Jørgensen
- Re: Connection ID lengths 1, 2 and 3 Eric Rescorla
- Re: Connection ID lengths 1, 2 and 3 Deval, Manasi
- Re: Connection ID lengths 1, 2 and 3 Eric Rescorla