Re: [netconf] YANG encoding in CBOR

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Thu, 28 March 2019 14:30 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 595171204BB; Thu, 28 Mar 2019 07:30:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 lD_bQ5UP1GPW; Thu, 28 Mar 2019 07:30:39 -0700 (PDT)
Received: from atlas5.jacobs-university.de (atlas5.jacobs-university.de [212.201.44.20]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3FC8B1204D1; Thu, 28 Mar 2019 07:30:35 -0700 (PDT)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas5.jacobs-university.de (Postfix) with ESMTP id 9A977B23; Thu, 28 Mar 2019 15:30:33 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas5.jacobs-university.de ([10.70.0.217]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10032) with ESMTP id zlVCyeSHjk3Z; Thu, 28 Mar 2019 15:30:33 +0100 (CET)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas5.jacobs-university.de (Postfix) with ESMTPS; Thu, 28 Mar 2019 15:30:33 +0100 (CET)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by hermes.jacobs-university.de (Postfix) with ESMTP id 79C55200AC; Thu, 28 Mar 2019 15:30:33 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10028) with ESMTP id u7ra-Qv1iXeU; Thu, 28 Mar 2019 15:30:33 +0100 (CET)
Received: from exchange.jacobs-university.de (sxchmb04.jacobs.jacobs-university.de [10.70.0.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "exchange.jacobs-university.de", Issuer "DFN-Verein Global Issuing CA" (verified OK)) by hermes.jacobs-university.de (Postfix) with ESMTPS id 2EDDC200A7; Thu, 28 Mar 2019 15:30:33 +0100 (CET)
Received: from anna.localdomain (10.50.218.117) by sxchmb03.jacobs.jacobs-university.de (10.70.0.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1591.10; Thu, 28 Mar 2019 15:30:32 +0100
Received: by anna.localdomain (Postfix, from userid 501) id 41B6F3007A0C2A; Thu, 28 Mar 2019 15:30:32 +0100 (CET)
Date: Thu, 28 Mar 2019 15:30:31 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Michel Veillette <Michel.Veillette@trilliant.com>
CC: Carsten Bormann <cabo@tzi.org>, Ladislav Lhotka <lhotka@nic.cz>, "netconf@ietf.org" <netconf@ietf.org>, "core@ietf.org" <core@ietf.org>
Message-ID: <20190328143031.ho7nmhpg4jb373p7@anna.jacobs.jacobs-university.de>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: Michel Veillette <Michel.Veillette@trilliant.com>, Carsten Bormann <cabo@tzi.org>, Ladislav Lhotka <lhotka@nic.cz>, "netconf@ietf.org" <netconf@ietf.org>, "core@ietf.org" <core@ietf.org>
References: <15fbaf84b20343a1b83f40b571149a14@XCH-RCD-007.cisco.com> <1ADF8201-ABB4-44FD-A515-F3F8E0DBF5FC@tzi.org> <20190323101003.gp3zvsvqqwc26jip@anna.jacobs.jacobs-university.de> <871s2vqsxi.fsf@nic.cz> <BL0PR06MB5042C9AA6B4A0CCD913F50D89A580@BL0PR06MB5042.namprd06.prod.outlook.com> <20190327061637.g5a7t7nulk7kyh2v@anna.jacobs.jacobs-university.de> <BL0PR06MB5042C28B79FF95078C8A881F9A580@BL0PR06MB5042.namprd06.prod.outlook.com> <20190328113018.uzujjtc7a2ukhovl@anna.jacobs.jacobs-university.de> <4656560A-2135-4F51-B3E7-8DB31B43B17D@tzi.org> <BL0PR06MB5042C392E675385B2AB0148A9A590@BL0PR06MB5042.namprd06.prod.outlook.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <BL0PR06MB5042C392E675385B2AB0148A9A590@BL0PR06MB5042.namprd06.prod.outlook.com>
User-Agent: NeoMutt/20180716
X-ClientProxiedBy: SXCHMB03.jacobs.jacobs-university.de (10.70.0.155) To sxchmb03.jacobs.jacobs-university.de (10.70.0.155)
X-Clacks-Overhead: GNU Terry Pratchett
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/4of9iUtFkNCuLLRefyvwdJAn_K0>
Subject: Re: [netconf] YANG encoding in CBOR
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 28 Mar 2019 14:30:56 -0000

I agree with your points. It seems this is the best we can do right
now and hopefully we can do better in the future.

/js

On Thu, Mar 28, 2019 at 02:06:17PM +0000, Michel Veillette wrote:
> +1 for value outside, string inside union
> 
> My rational:
> 
> - SID can have up to 8 bytes and will provide a marginal compression.
> - Generating SID for all 'enumeration' and 'bits' in case they are used in 'union' is lot of overhead to revolve a corner case.
> - YANG also support the 'choice' statement (https://tools.ietf.org/html/rfc7950#section-4.2.7) which is similar to
>    the concept of type tagging within union. This construct can be used by YANG modules specifically created for
>   embedded applications to take advantage of 'enumeration' encoded as value and 'bits' encoded as bit.
> 
> Michel
> 
> 
> -----Original Message-----
> From: Carsten Bormann <cabo@tzi.org>; 
> Sent: Thursday, March 28, 2019 9:47 AM
> To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>;
> Cc: Michel Veillette <Michel.Veillette@trilliant.com>;; Ladislav Lhotka <lhotka@nic.cz>;; netconf@ietf.org; core@ietf.org
> Subject: Re: [netconf] YANG encoding in CBOR
> 
> So for enum/bits we are back to value outside, string inside union?
> Can we use SIDs instead of the strings for the latter?
> This can’t be much more complicated than assigning a SID to each string that occurs in an enum/bits in a union.
> 
> Grüße, Carsten
> 

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>