Re: [netmod] Modeling unknown bits in YANG (draft-haas-netmod-unknown-bits-00)
Jeffrey Haas <jhaas@pfrc.org> Tue, 31 January 2023 22:45 UTC
Return-Path: <jhaas@slice.pfrc.org>
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 45C82C14CF1D for <netmod@ietfa.amsl.com>; Tue, 31 Jan 2023 14:45:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001] 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 6huc-fU4XfSJ for <netmod@ietfa.amsl.com>; Tue, 31 Jan 2023 14:45:19 -0800 (PST)
Received: from slice.pfrc.org (slice.pfrc.org [67.207.130.108]) by ietfa.amsl.com (Postfix) with ESMTP id 260E7C14F747 for <netmod@ietf.org>; Tue, 31 Jan 2023 14:45:18 -0800 (PST)
Received: by slice.pfrc.org (Postfix, from userid 1001) id 124971E039; Tue, 31 Jan 2023 17:45:17 -0500 (EST)
Date: Tue, 31 Jan 2023 17:45:17 -0500
From: Jeffrey Haas <jhaas@pfrc.org>
To: "Jason Sterne (Nokia)" <jason.sterne@nokia.com>
Cc: "netmod@ietf.org" <netmod@ietf.org>
Message-ID: <20230131224517.GA16678@pfrc.org>
References: <20230126205157.GC27893@pfrc.org> <DM6PR08MB5084D3B590B78CC06500E4779BD09@DM6PR08MB5084.namprd08.prod.outlook.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <DM6PR08MB5084D3B590B78CC06500E4779BD09@DM6PR08MB5084.namprd08.prod.outlook.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Gnb1quYij8yilKpBqvG6xZtzNIA>
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 22:45:20 -0000
Jason, Thanks for your comments. On Tue, Jan 31, 2023 at 09:50:49PM +0000, Jason Sterne (Nokia) wrote: > 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. I think there are a few different things to respond to here. For a small number of bits, as in my example in the draft, modeling as individual booleans may be reasonable. For "known" bits, the ability to see the on-change behavior might be useful. For my specific example where the op state is created once per BGP session connection, it's not a great use case, but perhaps other cases are a better fit. Atomicity is also perhaps a consideration as well. If many bits can change in the same field in short order, receiving multiple notifications in your streaming may be less useful if you need to know what the final state of the bits are to take action. A notification shouldn't turn immediately into a poll for the current state of the full bit set. I think the modeling as individual booleans runs into the same "unknown" problem that this draft is attempting to discuss. If bit position 1 is unknown, this pattern would require the creation of a leaf, unknown-1, that would similarly need to be renamed when it became known. Then we compound the modeling noise of multiple leaves, I think. -- Jeff
- [netmod] Modeling unknown bits in YANG (draft-haa… Jeffrey Haas
- Re: [netmod] Modeling unknown bits in YANG (draft… Jürgen Schönwälder
- Re: [netmod] Modeling unknown bits in YANG (draft… Jeffrey Haas
- Re: [netmod] Modeling unknown bits in YANG (draft… Jürgen Schönwälder
- Re: [netmod] Modeling unknown bits in YANG (draft… Jeffrey Haas
- Re: [netmod] Modeling unknown bits in YANG (draft… Jason Sterne (Nokia)
- Re: [netmod] Modeling unknown bits in YANG (draft… Jeffrey Haas