Re: [netmod] CBOR tags for Common YANG Data Types (RFC6991/bis)
Andy Bierman <andy@yumaworks.com> Sun, 31 July 2022 00:12 UTC
Return-Path: <andy@yumaworks.com>
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 C3510C136325 for <netmod@ietfa.amsl.com>; Sat, 30 Jul 2022 17:12:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.105
X-Spam-Level:
X-Spam-Status: No, score=-2.105 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, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks.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 J35gbcwbodV1 for <netmod@ietfa.amsl.com>; Sat, 30 Jul 2022 17:12:44 -0700 (PDT)
Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 A1368C136323 for <netmod@ietf.org>; Sat, 30 Jul 2022 17:12:44 -0700 (PDT)
Received: by mail-yb1-xb35.google.com with SMTP id 7so13803347ybw.0 for <netmod@ietf.org>; Sat, 30 Jul 2022 17:12:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xDz3G/MpMQKIrI40RCNyGc49DRtZxJBe/Bms2XIyqWY=; b=VRRfH7IxpmNMHrNh1yEZ0wPHswjcQ9SOvt5c59e6SqmLrWcw9bwZt1AODq0UcPf1Ic jFBW4sW2KzVfHAg9GKTCS3KAODBzUxDRsDPJskp3+Dzxf42gs40mDfyZAJxK/GkE43uX aneJt5HZR3l7w9Xs4GbR1pJ03xFvOyHyyujrqbEy9qbeyYO12uHGi54WYAqfS8wdOFRo 740AbnPOKAT2ZnZ2cwrF7vPHiTT9HlMpAWp8yDKP3yjqtIKdlwPSTbM3zs5kkut2TKnT XDWNDgH2Nnx4p8wMbzdu2rzYlruLTVlgVuZ7qU44APQpxXsKxr++541bSsnqXN9sIKvQ kGlA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xDz3G/MpMQKIrI40RCNyGc49DRtZxJBe/Bms2XIyqWY=; b=CmYHcbAWIY+JQDwMOpk2fWTvCBNcN22qErPxxzX5KDsZbTaJbXgA5MqTdpBGyR2KXR iTJFcQKrLYIyJIQQj/pL77rVq4mSaACPyrP00ifrM1+s/zjILyw4PaNsQW+Se2aGULaK nMPsDRFlv+qI/PQ1I/ZePBrIdI0By4v7wrtvM8HkPXZEPKCRzCzt3M7OOyjhWFMgQzjt 8uOXFiRUq0zG2FgrmER7mYHIUVCSpgySr5GbqdoNJ7WBTdNpUxPaUZ7gh2eU3pp3Y5+Y aaQXZXQ21C2vRnEVpnSgbZAuzGXMKRRYQa51QzXjEKFRDCWDMv/+jc1Kjhky9eTrQdBD 6S/w==
X-Gm-Message-State: ACgBeo2V8/kuoIbVkM+NQrKRRMCbvSJvXNqFKQ7B7+BjGu6NOmEVIKRa 9QdizV3W426UbSRPlvnfkT0YgWW+tb6xy8IMNok90g==
X-Google-Smtp-Source: AA6agR5xXRAzJWa/pU22B/4CIHqk5N/lw2mXpMia3dGPGs5ZrmvdjfMyynfp/fsSmALchGrbOIFIRWBNervROUbnW3c=
X-Received: by 2002:a25:ac58:0:b0:673:4728:d2c8 with SMTP id r24-20020a25ac58000000b006734728d2c8mr7261609ybd.197.1659226363669; Sat, 30 Jul 2022 17:12:43 -0700 (PDT)
MIME-Version: 1.0
References: <686025.1659214422@dooku>
In-Reply-To: <686025.1659214422@dooku>
From: Andy Bierman <andy@yumaworks.com>
Date: Sat, 30 Jul 2022 17:12:32 -0700
Message-ID: <CABCOCHRoA8qw1KiBqooaR_0hB7p9cMp94tnuwwSfyXE7Jj_NHw@mail.gmail.com>
To: Michael Richardson <mcr+ietf@sandelman.ca>
Cc: cbor@ietf.org, NetMod WG <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000000245db05e50ebe9c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/KUJOfxsgbiOfBElKI10scJ60Q2g>
Subject: Re: [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: Sun, 31 Jul 2022 00:12:48 -0000
Hi, On Sat, Jul 30, 2022 at 1:54 PM Michael Richardson <mcr+ietf@sandelman.ca> wrote: > > 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. > > IMO (2) is the best approach - Extensions can be added inline or from a different module using "deviate add" - could use 2 approaches: (1) define a new type and (2) use an existing type + extension - Other tools (like code generators and maybe SID file generator) can use the extension Something like: leaf foo { type inet:ipv6-address; ext:cbor-type cbor:bin-ipv6-address; } Assumes that some module like ietf-cbor-types.yang is published with appropriate replacement data types. 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? > > Strongly support. > -- > Michael Richardson <mcr+IETF@sandelman.ca>, Sandelman Software Works > -= IPv6 IoT consulting =- > > > Andy > > _______________________________________________ > netmod mailing list > netmod@ietf.org > https://www.ietf.org/mailman/listinfo/netmod >
- [netmod] CBOR tags for Common YANG Data Types (RF… Michael Richardson
- Re: [netmod] CBOR tags for Common YANG Data Types… Andy Bierman
- Re: [netmod] CBOR tags for Common YANG Data Types… Carsten Bormann
- Re: [netmod] CBOR tags for Common YANG Data Types… Andy Bierman
- Re: [netmod] CBOR tags for Common YANG Data Types… Michael Richardson