Re: [Cbor] [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: 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 6B2D9C136323 for <cbor@ietfa.amsl.com>; Sat, 30 Jul 2022 17:12:49 -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=unavailable 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 e3wSUQEpYaTL for <cbor@ietfa.amsl.com>; Sat, 30 Jul 2022 17:12:44 -0700 (PDT)
Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) (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 CE5EDC136324 for <cbor@ietf.org>; Sat, 30 Jul 2022 17:12:44 -0700 (PDT)
Received: by mail-yb1-xb32.google.com with SMTP id 204so12563028yba.1 for <cbor@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=lnDa9iSySoSHybD8orxNvNrdvalYy9At5uwIzkiBuO+glfVHopmhiIbTY44pswEkSi mJkCnGROFoNJb7g9zL+v9L8LmHxUPkg5P8e1UlfqYnSBnKyxupc2M5yPgAzKqnZbABvH xaZZWBwRFJRXfCGkomabqpNeoH9d6/jlPReiNSDgSMR5SHtYpN/hbKQ9Q+kQzK9r4Q6q rMw4ZwBefo/eUv1rmjX/I1Kyj9b35yt/PDhuGDo+NnH+WrzGphlP+0WaWtFO/B15bHLR 7a/8FUAQq8hyJbquBNwbo70lrqOBoGd2rNcvQjYEaRfnyfaZm0c++Kr/JyoX4SLM76Sg 2JCw==
X-Gm-Message-State: ACgBeo0exi1g9oCdhWrqO8ZBp//t/Ma9wxh2OF76/qJs+YwO+2q+QYnz wP7roeM1EDjb08Nua0WYX++QDydZrFYqXE8/qvdriQ==
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/cbor/KJj94Ito3baGFwnmBanH1cgagC8>
Subject: Re: [Cbor] [netmod] CBOR tags for Common YANG Data Types (RFC6991/bis)
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 31 Jul 2022 00:12:49 -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
>