Re: Fibonaccing CID lengths

Roberto Peon <fenix@fb.com> Thu, 23 May 2019 05:08 UTC

Return-Path: <prvs=0046220c1d=fenix@fb.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 6A4EE1200F7 for <quic@ietfa.amsl.com>; Wed, 22 May 2019 22:08:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=fb.com header.b=Wuiw7O+7; dkim=pass (1024-bit key) header.d=fb.onmicrosoft.com header.b=E0T1n9k8
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 GJIRH0cFrI4k for <quic@ietfa.amsl.com>; Wed, 22 May 2019 22:08:00 -0700 (PDT)
Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AEA5F120073 for <quic@ietf.org>; Wed, 22 May 2019 22:08:00 -0700 (PDT)
Received: from pps.filterd (m0109332.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4N4wrfO014821; Wed, 22 May 2019 22:07:52 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=facebook; bh=L+7+nvJrwiZpwCjo0lq0lz6ybTFWZUrnYmVTZnFfDpY=; b=Wuiw7O+7nfnDAfatur1EteeXV+j2gX1pYLLjcvIv+Yx6ch1wvRQQjwhOoKRNfaoBeHAq cD6jjujGQrW6M43f3rJV334ZXa7fWzXn4r5c5qQY1jBKoxdocM9L+8Ln8vOtVpQSkXps bGvDUyQl/2UpFrGFO2A8wHJKEOWaYuEZ+/k=
Received: from mail.thefacebook.com (mailout.thefacebook.com [199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2snabk2551-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 22 May 2019 22:07:52 -0700
Received: from prn-mbx05.TheFacebook.com (2620:10d:c081:6::19) by prn-hub06.TheFacebook.com (2620:10d:c081:35::130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1713.5; Wed, 22 May 2019 22:07:50 -0700
Received: from prn-hub01.TheFacebook.com (2620:10d:c081:35::125) by prn-mbx05.TheFacebook.com (2620:10d:c081:6::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1713.5; Wed, 22 May 2019 22:07:50 -0700
Received: from NAM05-DM3-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1713.5 via Frontend Transport; Wed, 22 May 2019 22:07:50 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L+7+nvJrwiZpwCjo0lq0lz6ybTFWZUrnYmVTZnFfDpY=; b=E0T1n9k8WQjPObM8K/JGZ8Q+NxOLxwxReWZAPHNah9wdiCTiiKP+sU7EFhJQ/oWqCkzYQZeQpPnKZy0SyLZwgGWel0/EPmZfsBFuBVgSAgo59N0FnIBPqbQxJE0t8u92W1lEQ29nfdzzfm97tpRx6xIZ5KgBRKYOjlz7+AIyh8U=
Received: from CY4PR15MB1542.namprd15.prod.outlook.com (10.172.160.9) by CY4PR15MB1832.namprd15.prod.outlook.com (10.174.54.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1900.17; Thu, 23 May 2019 05:07:48 +0000
Received: from CY4PR15MB1542.namprd15.prod.outlook.com ([fe80::e0d4:26ff:76c:391a]) by CY4PR15MB1542.namprd15.prod.outlook.com ([fe80::e0d4:26ff:76c:391a%9]) with mapi id 15.20.1922.016; Thu, 23 May 2019 05:07:48 +0000
From: Roberto Peon <fenix@fb.com>
To: Kazuho Oku <kazuhooku@gmail.com>, Christian Huitema <huitema@huitema.net>, Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>, IETF QUIC WG <quic@ietf.org>
Subject: Re: Fibonaccing CID lengths
Thread-Topic: Fibonaccing CID lengths
Thread-Index: AQHVEKiAeOO8WaR5Lk65vFlegNPyYaZ3UIAAgAATQACAAC31gIAAfoEAgAAYYqw=
Date: Thu, 23 May 2019 05:07:48 +0000
Message-ID: <CY4PR15MB15423897359517403F682F6ACD010@CY4PR15MB1542.namprd15.prod.outlook.com>
References: <20190522141238.GA23472@ubuntu-dmitri> <CAN1APdfBMeKGzsdLR__OLUHQ7pg=YM76C2Qxn6VDCXu680JQyA@mail.gmail.com> <ab64bdc2-805b-a86d-c525-41d076deac40@huitema.net> <20190522200406.GA28789@ubuntu-dmitri>, <CANatvzx4rxk6UU48omk-EfpoYzfg_zWR+N49zMWi_5rv722uQg@mail.gmail.com>
In-Reply-To: <CANatvzx4rxk6UU48omk-EfpoYzfg_zWR+N49zMWi_5rv722uQg@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [167.98.65.155]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: d62d7b01-a89d-4530-7609-08d6df3c9987
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020); SRVR:CY4PR15MB1832;
x-ms-traffictypediagnostic: CY4PR15MB1832:
x-microsoft-antispam-prvs: <CY4PR15MB1832A8E54DD5205D711FE15BCD010@CY4PR15MB1832.namprd15.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8273;
x-forefront-prvs: 00462943DE
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(396003)(366004)(136003)(376002)(346002)(189003)(199004)(99286004)(7696005)(110136005)(5660300002)(561944003)(25786009)(3846002)(6116002)(76176011)(316002)(86362001)(486006)(256004)(68736007)(52536014)(14454004)(3480700005)(66574012)(476003)(478600001)(71200400001)(71190400001)(9686003)(186003)(102836004)(54896002)(66946007)(73956011)(6506007)(53546011)(6246003)(26005)(33656002)(53936002)(7116003)(7736002)(446003)(2906002)(66446008)(11346002)(66556008)(66476007)(64756008)(91956017)(74316002)(76116006)(66066001)(229853002)(6436002)(55016002)(8676002)(8936002)(81156014)(81166006); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR15MB1832; H:CY4PR15MB1542.namprd15.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: fb.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: P77S5YkKhceE4IR0dTtQfGFshCmTHDbQzV4yzpIfwd9IJYxDbwyuM67AABJppYCtjBT3m+bRn6BOTOAaK4/Cwq5OMO2vUdWzCvXpd+IHV5A5Q9ieN+tzYSkbZdJLnPxv7nrN5vvePY6r9Vu7dpk28ylTfkZQIIiqGtcThCav98vxCF1EU79PjR0mdRLecUNJo9xf10hFBiK+j02PvT9dqV5oxYI7lg7N4JNJvBNkmpf/lsP0u2j/fXqAnW4VBs7Lbl7uDRvB3XIiGCRXA417XiKLn9D5I3BB2nEHvEPptSq90UC6bbXcrbe1swGgkVxWud/5g2lm+JI/4au+T39TjfcXad9ewdpDNmh7OKGn8/0sik50P1gs1FgIbwxhx+CWHWs3YBwTGgutv1gJvt8sYVLRHogoKTAD9e2zYzXTw3E=
Content-Type: multipart/alternative; boundary="_000_CY4PR15MB15423897359517403F682F6ACD010CY4PR15MB1542namp_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: d62d7b01-a89d-4530-7609-08d6df3c9987
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2019 05:07:48.5886 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR15MB1832
X-OriginatorOrg: fb.com
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-23_05:, , signatures=0
X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=599 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905230035
X-FB-Internal: deliver
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/RsMIuEbRJ3jKhGMjr88PbdW6Gn8>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
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: Thu, 23 May 2019 05:08:02 -0000

I'd be fibbing if I said I liked the encoding proposal.
A byte seems to offer enough range of possibilities that we are wanting to constrain them ready.

How about we simply assert for all bit-patterns who represent values <= the intended max, they mean what you'd naively expect?
This doesn't imply a linear mapping or any mapping for values in excess of max
-=R



From: Kazuho Oku
Sent: Thursday, May 23, 4:37 AM
Subject: Re: Fibonaccing CID lengths
To: Christian Huitema, Mikkel Fahnøe Jørgensen, IETF QUIC WG


2019年5月22日(水) 21:04 Dmitri Tikhonov <dtikhonov@litespeedtech.com>:
>
> On Wed, May 22, 2019 at 10:19:38AM -0700, Christian Huitema wrote:
> > Yes, that looks like a proposal that we should seriously consider.
>
> While the example is lighthearted, the proposal is serious: that is,
> remap 0 - 15 values of the nybble to a different set.  Do we need to
> represent every intermediate number between 0 and 48 (the maximum of
> the current PR)?

The question is what you gain by compressing the length to 4 bits.

I'd argue that the downside of compression is that endpoints would be
required to use a CID that is longer than necessary. For example, if
we are to allow only CID length of even-number bytes, there would be
in average one byte (8-bit) overhead per CID. That dwarfs the benefit
of saving 4-bit in the length of the CIDL field.

While I think using a 4-bit CIDL field could be beneficial for
avoiding ossification, I think I might agree with Martin Duke that
CIDL is currently an invariant that we are happy to accept
ossification.

So, what's the benefit?

>
> What if instead we do the following:
>
>      0 -> 0
>      1 -> 1
>      2 -> 2
>      3 -> 3
>      4 -> 4
>      5 -> 6
>      6 -> 8
>      7 -> 12
>      8 -> 16
>      9 -> 20
>      10 -> 24
>      11 -> 28
>      12 -> 32
>      13 -> 40
>      14 -> 48
>      15 -> 64
>
> This is as valid an approach as encoding the length in 8 bits and
> having to deal with invalid values or using a varint and having
> to deal with even more invalid values.
>
>   - Dmitri.
>


--
Kazuho Oku