[Cbor] Re: Early allocation for packed CBOR (Re: Reminder: CBOR WG Virtual Meeting on 2024-12-11)

Michael Jones <michael_b_jones@hotmail.com> Wed, 11 December 2024 02:00 UTC

Return-Path: <michael_b_jones@hotmail.com>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3CD84C1DC7F0 for <cbor@ietfa.amsl.com>; Tue, 10 Dec 2024 18:00:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.23
X-Spam-Level:
X-Spam-Status: No, score=-1.23 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FORGED_HOTMAIL_RCVD2=0.874, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=hotmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HOUQHpxOjVaT for <cbor@ietfa.amsl.com>; Tue, 10 Dec 2024 18:00:29 -0800 (PST)
Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04olkn2080.outbound.protection.outlook.com [40.92.47.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6C436C1DA2C9 for <cbor@ietf.org>; Tue, 10 Dec 2024 18:00:28 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KuoSPr8x1ZKBxneu71kFX7TbAKgLfYPN9QpLn4ZSHPtyfnsR44zyRhe+x/M77bsUzYRCAf6tDLeLhO9M4+gQvrH51xPY6nAupt26hioQIxl6BnM5Fipmkpf8XSGcMkr1TeROhQYPsPnKYD3Shl2OLuYFgaInvUCw93KSk6BaRtqtkBb5p0HhxGM++PXq6+dd6+hYtADAz3gabNVxiFJRGGAJZ4K+yMgqfqDarlzM+F1kkSf4bSsDAT9GYiu1Y1ucvUFwTvX4CGhiiuCgnyWewokVKniVZk8jtNK1RLPDw0knlACbHXryI75MMFR9qnJU1mxtXs/nyi+QfHa+LGer8A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BN82d2JobIKyxc1yKCcl8KtRqGRv3EVw4WyX2Feyirc=; b=U6HnSdDtlREQkst0MczwOuR38QTMpIqAmc58cZqffaiIKdMFeXojbcfVgCTshiJsruR7KDnO8e/Wr+rVWxSAOaGtPq6BVjfJm8vtVsNmqHQe7gnfdBKImcnYnOaFfqeMrEaUQ0nwY6v4l88rnjIcp+uEQv0Nkm57u47l78URQqFXNQXVU0ZlWWPSKyf7HcB7sFHl85+7Oohta1D6+XciuJkIm8xYZtPlX5sMV1bSHgUIzoN1ac5CNh6tzQI6l2wTzY0f+uBS6Jp38xBRQRQTnf6oO56cozeopfIkAIoGm7tcZ4vvVS2nYdPabtVobmkt4fpAecisrY2ZoockAmHHCg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BN82d2JobIKyxc1yKCcl8KtRqGRv3EVw4WyX2Feyirc=; b=TVpnr5kYM7Jo+E0yRkwdZfspb73ZCUWVVkodQxibXMX9whZ6sa/1dKPw8kIcCdomB1bUDMmPTGgEAl/8jxO9ZhJVFAADoU/GLSOPHsUx1pmnkovIUZDjNNipPnfYJGoeCLfXKYZ3WVTjV4zbZGw0fk/3Qc5y61rzaeGoJ6PR4lvVNLtVAzjN6KvxF/T2ysL4hztFJOlhBm++QmoMNLEnQ0HxlJpdH1cV6Uf9mNderY8BLUvWuttpOj3ktEJFU33MemFWhS366WEbOFv8QGs8Q1T3n9OGPdofkpDc4IdMnj+63GjAjcIYl+MWF2MKzUAeRBUPi/fmQLtRXpE/wSzwCA==
Received: from PH7PR02MB9292.namprd02.prod.outlook.com (2603:10b6:510:275::9) by SJ0PR02MB7359.namprd02.prod.outlook.com (2603:10b6:a03:298::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.19; Wed, 11 Dec 2024 02:00:25 +0000
Received: from PH7PR02MB9292.namprd02.prod.outlook.com ([fe80::e455:8c0f:5367:f8b2]) by PH7PR02MB9292.namprd02.prod.outlook.com ([fe80::e455:8c0f:5367:f8b2%6]) with mapi id 15.20.8230.010; Wed, 11 Dec 2024 02:00:25 +0000
From: Michael Jones <michael_b_jones@hotmail.com>
To: Joe Hildebrand <hildjj@cursive.net>, Carsten Bormann <cabo@tzi.org>
Thread-Topic: [Cbor] Re: Early allocation for packed CBOR (Re: Reminder: CBOR WG Virtual Meeting on 2024-12-11)
Thread-Index: AQHbS2jViXf2rGz05E+JLQuuCEl5QbLgRGWAgAAE3ICAAAB3gA==
Date: Wed, 11 Dec 2024 02:00:25 +0000
Message-ID: <PH7PR02MB92920864724AE9EEC1AA9935B73E2@PH7PR02MB9292.namprd02.prod.outlook.com>
References: <CALaySJKDFscUBGw4CPspXJvUTkXywVHc_FrmhO3ybBWTrwjGXw@mail.gmail.com> <CALaySJJ8-M9x8irtmF2pfDE3GRXU1am9n2a3XeDcmPT+kww+KA@mail.gmail.com> <CALaySJKTQT_9CC-wVVd+fY1NYJ73M8CP22hn=rWrFeTJSJDEsA@mail.gmail.com> <CALaySJKG3oagg6ffLTx8LgvLvnjHHA2DMGgY74E0q=rReAc4PA@mail.gmail.com> <CALaySJLtUR1=G_WH4H+zoJ5LCrHjBgEf1oW104zDtFQighY+gg@mail.gmail.com> <CALaySJLnKxU9m3BNPq4XayrSrorRBG2vuBz1AF-CsEBoSZe7Xg@mail.gmail.com> <CALaySJKaz7C=GN5E=saiDY4KxL+9xCfM0ocZuMStEQ96FnQ4KA@mail.gmail.com> <CALaySJJEXkey9vLAp8VqDXmPsWpxiWN9jjtVnGio1nMQ4K+mDQ@mail.gmail.com> <CALaySJJfc+tET4Vm5UQjHPK5mf61O0iR-1i6=X32CYtWxZLWTQ@mail.gmail.com> <CALaySJKdrk7aPzhT=kbE1B8pq1EBw74nmx_peSJMAoHsG5jyVQ@mail.gmail.com> <CALaySJ+fWX4zEnE5v-Q9R6eCv=kSJjnc-fsXL5PGPgac1GJAcA@mail.gmail.com> <B807C9D3-39A4-4024-BC1D-85DD84EA1735@tzi.org> <DFE56705-CCDD-4172-B577-C873E3DB4898@tzi.org> <5FEA5C07-4A39-4B58-B2AE-F261D111FCE6@cursive.net> <D0618F67-4868-4745-A526-F73DF1A98E1B@tzi.org> <98C6BEDA-C4B2-4657-ABE2-19FE637CE782@cursive.net>
In-Reply-To: <98C6BEDA-C4B2-4657-ABE2-19FE637CE782@cursive.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: PH7PR02MB9292:EE_|SJ0PR02MB7359:EE_
x-ms-office365-filtering-correlation-id: d291ee3f-23e5-4d53-84f3-08dd19879401
x-microsoft-antispam: BCL:0;ARA:14566002|461199028|7092599003|8060799006|8062599003|19110799003|15080799006|10035399004|102099032|56899033|440099028|3412199025|4302099013|1602099012;
x-microsoft-antispam-message-info: TpJkxnO0B6KYqtDCh8toWW9ZF4w4em4g+nZnYZJ0/c9FNuxcc1qiyes46rZrWkK+eGHz0CgCzU29rQNiiyhdhxvYT40eCJKBd/H8pkpKOlU/RMmjzLP44QAgDDg+HkK496dMJ3lskXtXzQpK68kAaEXT+W6ISdsWKWq0rYF0qP3E9FLn98LWMhn2QwG2TUPUNcQiF4OiJkDLMKVBpBLr9Sa4omqL+ehvJzAWto3tRXjEd4hECuuunVtYyRPTuPlSodt7p78NpOyLr2IUp5jljb2pMfwJdRTPJmMsuVZnGSoDdt3PwuwSp4nrrpjz5l6CgnvM9CMAmFLA5VsAqDhh2LGVFC8B0XuoNMxJ32GHjCyq80WKvahfcTgCn30y9pPOd4vZK88PR9u0ypDemfSgtN+PAVyUYcVPdQfybKnI/AuufFxlbhlRREKmRGCtCdG0ecfjkcDqwLvy9Xw9WHVEYbM56LKAUIc8eDc2i2/IZZcjPNm+kLSzmMdsHHcOCg5EZaxb1JD/WewgTqotAJMBBKsCrH+0BX29F3WNCQayf3QrVpyZs7N52vJTp1oKbM9hopU69963ZD+RpHjh3phFLAQRL0aviZ2aBQ6jPlv1va4Q4G0Z6y0Sz1r/XHdpuyIFIjj1h//ioOEW5yTv0viQXVKF4pjt2seNaYTfr/UGIGWpXYPeVtDEjPsy8BG+j8xBj2TV5XkCf1NAaz/CG/PaYIcCzh1MGLyH7RyXee95Pw3qMiJlZt4PPEk1TYnxBd+ijccIFGPbg6xDRpezkXYcb6VZp9DXDfRiSFquufaROXjbi/+/WuNLlCmgtGxcRisQIm9j7ji+3gkxcxqCwNVCB/vY+UqudW6NPLc4L9Ve7T+t68x/NoQCtsO0KhhAl9duBBI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hk1oqrDngSEp2cs4rBowb8KsQf9d5SxMIy+q0vHBtUg8G0VwuQwbPY70pD66Z9Ln49XSHJFzJhRwBGK+DkXQtGaIcmRwin1q53q12vznziOIuv7ssWjX5OHHXV+JxjHSxHFyFMzoSD1Phk3ro7ofR+SYcsUW8UfNE7kQU31sJAljVmUgV1PvHj4NVMoaib6v35ciOOJXMuIzJrBFAQQJhT+hNuGzY1a5LBTGPhzUmfj5H7R/bXd4/fZ/l/WK24ODLpFXS9T8Okr72xev2TxslsALUpnNJOmPAMKZlkj9UKHxd+6XjINMneb3mA69qz073MKC9TlAjhLyOm19oC9xMAbFXL9uSjm4Rms04TxqtzLvE+V4WXpKtPj0Lyu6dGQolIOYSEY9LviDunlLbJCROYNX81ovP+q5SRMWh64XBMO72vOTFG9satjFokAT09rVyLqr/X1zE0IV4fUt9MkVQq9KrMb9f5hnKHqf0YK33I6crnElHbN6aG6hAxAstjMAz/cZr0zFBNiPqqwKZi3tJHApwqEI8wt/x/+ePAyQTjYPteTGWlE6s4eXuxxmBjlFryVUzqE3DlgCP3wM7QtoKJ9D5K+wBR
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-3d941.templateTenant
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: PH7PR02MB9292.namprd02.prod.outlook.com
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-CrossTenant-Network-Message-Id: d291ee3f-23e5-4d53-84f3-08dd19879401
X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Dec 2024 02:00:25.0779 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR02MB7359
Message-ID-Hash: O4UWROMAUJBX4O326DIRHIUC5543JHKD
X-Message-ID-Hash: O4UWROMAUJBX4O326DIRHIUC5543JHKD
X-MailFrom: michael_b_jones@hotmail.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-cbor.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: CBOR <cbor@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [Cbor] Re: Early allocation for packed CBOR (Re: Reminder: CBOR WG Virtual Meeting on 2024-12-11)
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/oDvXqQCuhzxZj1Oi94ZzpnWUNqM>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Owner: <mailto:cbor-owner@ietf.org>
List-Post: <mailto:cbor@ietf.org>
List-Subscribe: <mailto:cbor-join@ietf.org>
List-Unsubscribe: <mailto:cbor-leave@ietf.org>

I agree with Joe.  These tags should be significantly pared down before registration.

                                -- Mike

-----Original Message-----
From: Joe Hildebrand <hildjj@cursive.net>
Sent: Tuesday, December 10, 2024 5:58 PM
To: Carsten Bormann <cabo@tzi.org>
Cc: CBOR <cbor@ietf.org>
Subject: [Cbor] Re: Early allocation for packed CBOR (Re: Reminder: CBOR WG Virtual Meeting on 2024-12-11)

I do not agree that 335 million tags, including most of the remaining 1+1 tags is worth the functionality here.

—
Joe Hildebrand

> On Dec 10, 2024, at 6:40 PM, Carsten Bormann <cabo@tzi.org> wrote:
>
> Hi Joe,
>
> please get well soon!
>
>> On 11. Dec 2024, at 02:01, Joe Hildebrand <hildjj@cursive.net> wrote:
>>
>> Does anyone else think that this is a LOT of tags to allocate for one thing?  Was there no other design that could achieve the goals?
>
> A ton of tags.  I think some 335544318 or so of them.
>
> Section 2.5 briefly addresses this [1].
>
> [1]: https://www.ietf.org/archive/id/draft-ietf-cbor-packed-13.html#section-2.5
>
>
> Let me point out that the way this was designed simply exercises a design pattern that has developed for CBOR.
>
> In CBOR, tags have exactly one data item in its content.
> For sharing tags, we can use that as an index into the table, so we have just one of them (number 6, in 1+0 space, where we add 16 direct sharing references from the 1+0 simple value space as well).
>
> For argument-bearing tags, we have both the table index and the argument that need to be included.
> This could be done putting these into an array, at the cost of one byte (0x82, that is).
> Including the index in the tag number is a byte-saving workaround that now has been used in many places.
> It means that we allocate a range of tag numbers and provide a function that computes the index out of the tag number (usually a subtraction).
>
>
> Now, there is also the question whether we should expend the amount of tags we are registering here.
> CBOR-packed is not really “one thing”, but a rather versatile mechanism that can be used in many ways (often by defining application-specific table-builders), so expending some of the tag reserve for this appears to be a good investment into the future.
>
> Here is today’s tag-report:
>
> range  used     %                 free                total
> 0 1+0    13 54.17                   11                   24
> 1 1+1    73 31.47                  159                  232
> 2 1+2  1087  1.67                64193                65280
> 3 1+4 65539  0.00           4294836221           4294901760
> 4 1+8     2  0.00 18446744069414584318 18446744069414584320
>
> Expending about one fifth of the free 1+1 tags (and one tenth of the free 1+0 tags), as well as 80 % (!) of the 1+0 simple values, is a sizable investment, but I would consider that worthwhile given the above.  I don’t think the thirteenth of 1+2 and 1+4 each is oversized at all.
>
> Grüße, Carsten
>
>
> PS.:
> If we talk about numbers, we can group the tags to be allocated into table building tags, of which we spend two (one 1+1 and one 1+2), special tags for function references, of which we spend three (1+1), and the approximately 335544318 we use for straight and inverted references (plus the one 1+0 for shared references).
> Seems frugal to me :-)
>
> Historical tidbit:
> an early form of cbor-packed was part of the initial design before we even named the format CBOR; we removed it from the proposal because that already was complex enough.  I’m quite happy that 11 years later this is still the way we want to address redundancy, but by now with a few refinements.
>

_______________________________________________
CBOR mailing list -- cbor@ietf.org
To unsubscribe send an email to cbor-leave@ietf.org