[netmod] CBOR tags for Common YANG Data Types (RFC6991/bis)

Michael Richardson <mcr+ietf@sandelman.ca> Sat, 30 July 2022 20:53 UTC

Return-Path: <mcr@sandelman.ca>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6ED6AC14CF06; Sat, 30 Jul 2022 13:53:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.909
X-Spam-Level:
X-Spam-Status: No, score=-6.909 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
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 jj-NQOZc-RQH; Sat, 30 Jul 2022 13:53:47 -0700 (PDT)
Received: from relay.sandelman.ca (relay.cooperix.net [IPv6:2a01:7e00:e000:2bb::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CBE93C14CF01; Sat, 30 Jul 2022 13:53:46 -0700 (PDT)
Received: from dooku.sandelman.ca (unknown [75.98.19.153]) by relay.sandelman.ca (Postfix) with ESMTPS id 5426D1F4A2; Sat, 30 Jul 2022 20:53:44 +0000 (UTC)
Received: by dooku.sandelman.ca (Postfix, from userid 179) id A34A01A05CE; Sat, 30 Jul 2022 16:53:42 -0400 (EDT)
From: Michael Richardson <mcr+ietf@sandelman.ca>
To: cbor@ietf.org, netmod@ietf.org
X-Attribution: mcr
X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 26.3
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha512"; protocol="application/pgp-signature"
Date: Sat, 30 Jul 2022 16:53:42 -0400
Message-ID: <686025.1659214422@dooku>
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/8xbCSGyiW6YhfBK0Vt-lO-IMBYI>
Subject: [netmod] CBOR tags for Common YANG Data Types (RFC6991/bis)
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 30 Jul 2022 20:53:48 -0000

I had a few (well.. two) hallway conversations about RFC9164 (IPv4/IPv6) tags
for CBOR this week.

Specifically... in large YANG described dumps (such as a BGP FIB table) it
becomes critical not spend so many bytes on some fundamental datatypes when
there are hundreds of thousands of entries.

"ietf-yang-types" and "ietf-inet-types"
Also a need for AS numbers, MAC addresses in optimized formats.

I think that we concluded that there are three ways to do this.

1) a hack in a document when I use yang:ipv6-address I wrote some text
   that says one should use CBOR foo.  The result is very specific to that
   use, and it is never encoded in the YANG. [not great]

2) some kind of extension where when I *use* yang:ipv6-address that I say
   that it should be encoded in CBOR using tag <foo>.
   Also specific to that document/module, but the YANG knows.
   Russ speculated on the ways in which one could use the right yang
   extensions to do this without new syntax.

3) some revision to rfc6991 that would include statements about how to encode
   the known things in CBOR.  Then we just have to include a new enough YANG
   module that specifies things.

It seems that draft-ietf-netmod-rfc6991-bis-13 is in progress, although I
don't seem to follow the list to know what's up with.
(I thought I subscribed, but maybe it was all via IMAP)

Is there some interest in doing this?
I guess the better question is, what are the objections?

--
Michael Richardson <mcr+IETF@sandelman.ca>, Sandelman Software Works
 -= IPv6 IoT consulting =-