Re: [netmod] Modeling unknown bits in YANG (draft-haas-netmod-unknown-bits-00)

"Jason Sterne (Nokia)" <jason.sterne@nokia.com> Tue, 31 January 2023 21:50 UTC

Return-Path: <jason.sterne@nokia.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 51909C152577 for <netmod@ietfa.amsl.com>; Tue, 31 Jan 2023 13:50:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.095
X-Spam-Level:
X-Spam-Status: No, score=-2.095 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, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_NONE=0.001, 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=nokia.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 XJe9papV_uxS for <netmod@ietfa.amsl.com>; Tue, 31 Jan 2023 13:50:54 -0800 (PST)
Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2072c.outbound.protection.outlook.com [IPv6:2a01:111:f400:7ea9::72c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 18339C152575 for <netmod@ietf.org>; Tue, 31 Jan 2023 13:50:53 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KdqST/WV0dDv9lm8jGFLiA5ryWDuRHW3Hfds3i0btvgP3t5o9ZPUMHc/2BhVfZZb9eb4UGjV8dvG1MFnHGeHUrcw0OrYoVOwbg8xJIhH+jCgQ6VdIJ9GuHmgvsykPbm0hTQAWi/PGRZN0Gpr2AXG1gEFvUQ4TX0ckJUszxcn1cXDX1EvnSzLYJgJn1uxwNdwZX2xcbRqrVbZNmysKTI0iXewgtaXYDrkX8X8IhERSBMLBPsRi/pzD3OQcCg5T7IuJKMfIlniyT6tJwQofVRKS5T/BRbmngMRMC72F1JlbE+7YXC2Xo6opYhZLr1D8XF6Uni11EtqHMbj9sbnYCMvWA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=j1G6vz2CRuEfbTU8Uo+MDluuD2p/1+/ZKw2VGr6vXHU=; b=WiBR0ByiF+IDTUWoWuoPcV6x53QOOEqfrNWS5nzuZqpwAx4TPhGWcc3KC+mVaH6bxsvZ7djzz/bF+s6Tw8uAub8Jq8FLulTjsIvwaayAwT91N/6/83A/VEa0G1tsKutlPFkFsQgDQ/UqMa+83iJwU2wF3S/i94N7RTIxijwj/LPP53ZEh3Tj4/s+pYFS1xQa9qWaePX076i9WRz5ljum+Tvt1MazGS3tMKutJ7q0+Gv6eICwrR31TD2BWEXikOMKahU0/2xKKgIwJrHwEFZLLc1zU7f0uTDeXoZnA5mODho6DKAuv6x592CPRjRyxEqH1BNeCRYLWfvJyj1CNE6NdQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia.com; dmarc=pass action=none header.from=nokia.com; dkim=pass header.d=nokia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=j1G6vz2CRuEfbTU8Uo+MDluuD2p/1+/ZKw2VGr6vXHU=; b=oR/Cm61zRte+K8p4zAL3znfhMMOUxxoov6rspgGWElIdXeMc/cTyJ/YVeLvbVmWFlekXQU05qGX59vJFVm+ZeWc1+S4sYCkj0tC8T9tR1G0/6zbDACbTMbQVtiBqlN6psBvW76SG/XXbB2VuN2F0rucVlxVYN5xoGrxiP1HesiQZ7mPg/uAf6ZJhkFNuqPNfFGzT6gtOTmospPkznlGuSGCIMp80f9FLj6/zXy7eBcMG8LtOKINlGDCcupoQReqVULrhhB7Or2iYzAF9Ywjr4k/Un+AxNdxrmBxbXeXnErDYvW/xvfSJtFmcCRV5jhKzf0f3BC1WsLGjp9o/KftMMQ==
Received: from DM6PR08MB5084.namprd08.prod.outlook.com (2603:10b6:5:41::29) by DM4PR08MB8337.namprd08.prod.outlook.com (2603:10b6:8:40::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.36; Tue, 31 Jan 2023 21:50:49 +0000
Received: from DM6PR08MB5084.namprd08.prod.outlook.com ([fe80::8780:e439:2056:de6d]) by DM6PR08MB5084.namprd08.prod.outlook.com ([fe80::8780:e439:2056:de6d%7]) with mapi id 15.20.6043.036; Tue, 31 Jan 2023 21:50:49 +0000
From: "Jason Sterne (Nokia)" <jason.sterne@nokia.com>
To: Jeffrey Haas <jhaas@pfrc.org>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] Modeling unknown bits in YANG (draft-haas-netmod-unknown-bits-00)
Thread-Index: AQHZMcgT3h73skkPLEm9QyFV6TM24a65FpZQ
Date: Tue, 31 Jan 2023 21:50:49 +0000
Message-ID: <DM6PR08MB5084D3B590B78CC06500E4779BD09@DM6PR08MB5084.namprd08.prod.outlook.com>
References: <20230126205157.GC27893@pfrc.org>
In-Reply-To: <20230126205157.GC27893@pfrc.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nokia.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: DM6PR08MB5084:EE_|DM4PR08MB8337:EE_
x-ms-office365-filtering-correlation-id: ceb76fd4-4dae-4b77-b1d2-08db03d5372a
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: +8lJ/4a/t8pGc61kEAW/a58XiCoB5MIn7EGYbppmXvr0MIdtU5AV35LqW6QImdraIO4z6qQE2eT/Fyjr0MUfIYo7VGY2pKmD7QYwtxXCzx8PO0r+mCmmX9I6kA16mAZ+0HFZpyG3FX+pG9zIJfcOy6Qj6k+P9MT22iIVK+Fpe1RhgBwddOO3D17A/cs5T1POk/prq+j3lwPXMLkULvTvsUBdPzD2QXs9z+mlTN2pVx1aRmjH+Hs1IwhcLxvbhhzV/q7FzPvw8DRvQ0BrwnewTi3019Dqh0TD7727oxRqCc3gW1VGrBWs1RBGYuufY7yz6kd+KXfEyWnH9XPNZQ1jxpP2tGcrqL4em0tBiWw6JuHYN7MYNDXqHGoAflqtT+cRYi13pRVDQh/g0jXp8tWhlsBGKYfFkjY503vLVgnAxRtsRpWQt6YN2o2aIeXcSDpno4ki+UX/AlId//w1LSv5t3dNYdEmHDDbV9aQgGyMEJcFQJIuB1/HpBdykKKxUMQfNlMAZFu+5IpQLS3x+W99PEIpxlzRYTIsYh7ORpAd+PJQb0vaXL8b0mRVvG++DuWCf2lSV9XlhGmznjP1RcCuUJ9+UhoXACGGoqVX1qiFCQQ4VO9tWiRfyX1wEirzR16Ln1OsaxoBmrFTOtU6m/PmBblRGxSzS4ZVox2zCC+RICc038Wnk6bv9KNuBT7Rl75IKA/iaJ6H+E0LlQCbgF0H96bi8rhOq4HpfjnOtXgK7varJY3I+3a/AIYY+NsGvt8Wra2i/cZAe9I/5GOLjXjhFA==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR08MB5084.namprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(136003)(376002)(39860400002)(366004)(396003)(346002)(451199018)(82960400001)(2906002)(33656002)(478600001)(26005)(186003)(9686003)(122000001)(316002)(110136005)(66476007)(38070700005)(55016003)(86362001)(38100700002)(66946007)(8676002)(76116006)(64756008)(66446008)(8936002)(66556008)(41300700001)(52536014)(5660300002)(53546011)(7696005)(66574015)(6506007)(71200400001)(83380400001)(966005); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: jZR6KCjIZqAXHUT0+vNbX4iGEf/H65jARiA2GATIEi4K+Wn15+4OqtKsXL9Z+7pCz479iWPUo5f4xl1cJEnNZQ+TdPqLlmEFE9QC3jzjm6EacMX+YfjAsPyoST9NcmuYMtst471Zkia2/M8gykMpJiM/Du93R04MWsL6GTAFe5RMkts15nv4laJ6ZwPIiJsnJjMdiSVrPsqviIcQVLXQu3oVL85BX+o+D72ZGneoe953xaJq/yo8ljU9NNuCYTKpq2fmhHRUpnxk+KWROx0QPpwZrLtEJpWmB9ePN3ecijScWRNdQU3BArBPW1UrzAPnfefK+MXjoL3feisCxLRdoF2GI3s40lcFpiFk901dVTLOc+zsP6qUCwWAeH/0ooKFGZLGoet54uCX/8tNj4sWIEisvlzy+nR30KdMKHqw3GWbPeUqKUT3zXU8z0NAnGAtEKBI37LAcS3s/+AmXnMsFQUt/PMIeMtrkaX6fuCPYnrB0bu5L8WaEtf2ODw2OB1FtyyDbKAoqT4V2YxGH9XPEzVw/KksywhpRI68joAGKABqJ5lbMz3QfsWZ76zeg95ixI1+Bk+gq3J83iNZghYBofhdFotiwJEbF5ckSSfkT5cLu1MC7iXdbwk85YxPgqHXauWRuBWluQCgAQMo9/XjBRBpzdy24wFXg+bWVoatnxLvYwVd4tTofqcNhoOPaCx7h16XKgF2sOb9TfIU6NP4pjb54Bwfu4XqmbUiT0ABxESfyudCQj2U2LzBqS1Jpy0JZvnfSfM2Yr7vKsnWZQNqeuh4LSbQJfjIZwJEBD2RhsZ1ggo5uhREiM6F73LILDPhFmAwCth8D0jUhOVWx8+J6ILivVXKc83JjGM99rIJBhrT2c5hDr+7NHBsOqoZDnLaRtNTywJMbZ5wK25E6neGu/6k7zYMAGv3cnD2UEA02NpVEQJ6S3m+va+R95X54ukPaSTN4KMI386IaGJxJYQk4sz6MLSjb5M1LRYE2K7iLuPxBoY6NJLMH7ipQYd7pI2XP80GLrUcZ8gZJYKOSvfZChBVz0hLw9KRwuoDIupar1ppEhduDQS/SrNzWUPg1yThmCljLgGbtStW6gDDh9Nle/PYiJ32apbOtBiMAcYvcR7+oTykkwKmZuJiiuevJ6T8Sw/ORS6zUWSozyjOyGz/U/HdpkDe1Bwi8QAPZQYmKpJh4GwDBYagf3DUSFhKXluxU61OLZzk+jbGW5dY7LoXQzkr+TMJm6m5UfeE1zjoPtNNV9u7vuu9iPiYr70fV27NUke7jAZBfobHArAcr3sFgerZWP9XowJOBwonuT4XT6YxiPdNAes7pcBdajPX2H8xr6XJ9dLdNWSrGYieNFFObL0/5yfupcvTVYcouft/WIEm1JJFlDFJIzQWjwQnYum/RCtmmpgYMMTV3UPWqJJrht7mkeCCygX7Z3y48OCsE1S4z1tAFRu6B2pSMHvBKxJlM+uxE+9XXr+c863HBFsOwe39Nw/aCFAgEedebRa9DHREG59AT9SfKA+vuWGh+o/2WooYMM58a2FDOrREE9d+LTZrWz2iw6Y9L1NeZVk6xLgOziviiu+MixIbwIOCh5n7
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DM6PR08MB5084.namprd08.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: ceb76fd4-4dae-4b77-b1d2-08db03d5372a
X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jan 2023 21:50:49.1050 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: J59K1uW8lh65UZkLZN6aWLJ3wxA5srfmbVqUejrpxDfF0NP7GSmpz1KwTcNJjIRgRs839CrXmtj/Rt95k7e8Gg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR08MB8337
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/VZEpqpomnyGdn0iUUT-Vvz9LLBI>
Subject: Re: [netmod] Modeling unknown bits in YANG (draft-haas-netmod-unknown-bits-00)
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: Tue, 31 Jan 2023 21:50:58 -0000

Hi Jeff and WG,

One potential consideration that came to my mind is about the choice of using 'bits' at all (vs a set of Boolean leafs), and it is related to on-change telemetry.

With a leaf of type 'bits' that has on-change telemetry support, an update will return the entire bitfield. That means you don't immediately know which particular bit changed.

If a set of Boolean leafs was used instead, then a client immediately knows which specific condition changed state.

There are pros and cons to both sides of this though. With on-change and 'bits', you do get the entire bitfield in the notification. So if you want purely stateless processing, and are willing to go through the entire analysis of all the bits every time you get an on-change notification, then it works well. It also works well if you need/want to look at a combination of the bits in order to process the update in the collector/client/consuming-app.

But if you just want to immediately know exactly which item changed, with bits you would have to cache the previously received value and compare to see which bit(s) changed.

I'm not sure this is a important consideration for your proposal but wanted to bring it up in case is resonates with others.

Jason
> -----Original Message-----
> From: netmod <netmod-bounces@ietf.org> On Behalf Of Jeffrey Haas
> Sent: Thursday, January 26, 2023 3:52 PM
> To: netmod@ietf.org
> Subject: [netmod] Modeling unknown bits in YANG (draft-haas-netmod-
> unknown-bits-00)
> 
> The following draft is hopefully a simple proposal.  It models operational
> state for protocols with bit vectors using the 'bits' type in YANG when a
> given bit position hasn't been assigned yet.
> 
> This proposal comes out of a brief inquiry to the YANG doctors while trying
> to solve the problem mentioned in the draft for the BGP YANG model.
> 
> Your feedback is appreciated and, if the proposal is acceptable, I'd suggest
> adoption by the Working Group.
> 
> Please note that the draft is on github.  I'm happy to take feedback as
> issues or pull requests there:
> 
> https://github.com/jhaas-pfrc/draft-haas-netmod-unknown-bits
> 
> -- Jeff
> 
> ----- Forwarded message from internet-drafts@ietf.org -----
> 
> Date: Thu, 26 Jan 2023 12:43:24 -0800
> From: internet-drafts@ietf.org
> To: Jeffrey Haas <jhaas@pfrc.org>
> Subject: New Version Notification for draft-haas-netmod-unknown-bits-
> 00.txt
> 
> 
> A new version of I-D, draft-haas-netmod-unknown-bits-00.txt
> has been successfully submitted by Jeffrey Haas and posted to the
> IETF repository.
> 
> Name:		draft-haas-netmod-unknown-bits
> Revision:	00
> Title:		Representing Unknown YANG bits in Operational State
> Document date:	2023-01-26
> Group:		Individual Submission
> Pages:		18
> URL:            https://www.ietf.org/archive/id/draft-haas-netmod-unknown-
> bits-00.txt
> Status:         https://datatracker.ietf.org/doc/draft-haas-netmod-unknown-
> bits/
> Html:           https://www.ietf.org/archive/id/draft-haas-netmod-unknown-
> bits-00.html
> Htmlized:       https://datatracker.ietf.org/doc/html/draft-haas-netmod-
> unknown-bits
> 
> 
> Abstract:
>    Protocols frequently have fields where the contents are a series of
>    bits that have specific meaning.  When modeling operational state for
>    such protocols in YANG, the 'bits' YANG built-in type is a natural
>    method for modeling such fields.  The YANG 'bits' built-in type is
>    best suited when the meaning of a bit assignment is clear.
> 
>    When bits that are currently RESERVED or otherwise unassigned by the
>    protocol are received, being able to display them is necessary in
>    YANG operational models.  This cannot be done using the YANG 'bits'
>    built-in type without assigning them a name.  However, YANG
>    versioning rules do not permit renaming of named bits.
> 
>    This draft proposes a methodology to represent unknown bits in YANG
>    operational models and creates a YANG typedef to assist in uniformly
>    naming such unknown bits.
> 
> 
> 
> 
> The IETF Secretariat
> 
> 
> ----- End forwarded message -----
> 
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod