Re: [netmod] Adoption poll for draft-haas-netmod-unknown-bits-02

Jan Lindblad <janl@tail-f.com> Tue, 22 August 2023 08:08 UTC

Return-Path: <janl@tail-f.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 A6CF5C169535 for <netmod@ietfa.amsl.com>; Tue, 22 Aug 2023 01:08:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.906
X-Spam-Level:
X-Spam-Status: No, score=-1.906 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable 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 Z-GMJV0rNKLM for <netmod@ietfa.amsl.com>; Tue, 22 Aug 2023 01:08:09 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id B663EC14CE42 for <netmod@ietf.org>; Tue, 22 Aug 2023 01:08:08 -0700 (PDT)
Received: from smtpclient.apple (213-67-237-150-no99.tbcn.telia.com [213.67.237.150]) by mail.tail-f.com (Postfix) with ESMTPSA id CC0D41AE0312; Tue, 22 Aug 2023 10:08:06 +0200 (CEST)
From: Jan Lindblad <janl@tail-f.com>
Message-Id: <B39FEA6E-EA4B-448A-8CE1-DB7AAAD92991@tail-f.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_9F47F54C-D9BA-45C9-9843-D8D04E93AA97"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\))
Date: Tue, 22 Aug 2023 10:07:56 +0200
In-Reply-To: <EC8F18BD-11D0-4F41-AB18-EC16139F9A5D@pfrc.org>
Cc: "Rob Wilton (rwilton)" <rwilton@cisco.com>, Italo Busi <Italo.Busi=40huawei.com@dmarc.ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
To: Jeffrey Haas <jhaas@pfrc.org>
References: <01000189bc910558-2b97ab1b-28d3-4411-9810-e4a8eb548abe-000000@email.amazonses.com> <7b0b5cb0a06d473bab8cca0f2f57c953@huawei.com> <7FB82DF6-EA37-4F11-AECF-DE707859F21B@pfrc.org> <BY5PR11MB4196386BB64B8E17219503C7B51EA@BY5PR11MB4196.namprd11.prod.outlook.com> <EC8F18BD-11D0-4F41-AB18-EC16139F9A5D@pfrc.org>
X-Mailer: Apple Mail (2.3731.700.6)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/JIvTCBquFHVeGsMhQzCCHJm3Ths>
Subject: Re: [netmod] Adoption poll for draft-haas-netmod-unknown-bits-02
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, 22 Aug 2023 08:08:12 -0000

Jeff, WG,

The recommendation I would give for modeling bit fields with reserved bits is to not model them as the YANG bits type. Even if, on the protocol level of whatever it is that we are managing, some uint16 is divided up into three well defined bit fields and have another few bits reserved for future use, that is no strong reason for selecting the bits type in the YANG representation of this functionality.

YANG works best when those three currently defined bit fields are defined as three separate YANG leafs. Logically, that is what they are. Three separate quantities. Later, when some of the reserved bits are taken to good use, another YANG leaf that declares the new functionality can be easily added to the next version of the YANG in a backwards compatible way. The new leaf could even have an if-feature statement, so that clients can identify server support up front. Or use the YANG choice statement to describe how various fields exist on condition that certain other leafs have some specific value.

If we are concerned about the efficiency of the management protocol, then there are *significantly* greater savings to be had by taking a more holistic approach, rather than focusing on the encoding details for esoteric leaf types. Txid comes to mind :-)

Best Regards,
/jan



> On 21 Aug 2023, at 16:15, Jeffrey Haas <jhaas@pfrc.org> wrote:
> 
> Rob,
> 
> Rewinding to the points raised in the original discussion thread:
> 
> 
>> On Aug 21, 2023, at 9:40 AM, Rob Wilton (rwilton) <rwilton@cisco.com <mailto:rwilton@cisco.com>> wrote:
>> Specifically, sometimes/always just reporting the raw hex value alongside the bits value seems like a simple, effective, and robust solution, and perhaps we could recommend a standard name prefix or suffix for the name of the raw value leaf relative to the bits value leaf.
> 
> Leaf name aside, the question is what do you do with the raw value, especially when it's not really octet-aligned?
> 
> In the example that prompted this discussion, we have a nybble.  (See RFC 4724) In that case, the nybble occupied the high order bits.  The natural value that it is part of is a uint16 that contains a 12 bit time value.
> 
> The "raw" for the bits really shouldn't be the uint16.
> 
> The "raw" really shouldn't be a dump of the full capability.  I think it has been a mistake in prior models to ship raw that devolves to "you need to tcpdump the yang".
> 
> One practice may simply be to say "shift the bits to the right" (presuming usual network byte order considerations in IETF), which would take this nybble and put it in the low-order bits of the respective leaf.
> 
> Also, keep in mind that these practices are often needed for "RESERVED" fields that later on are decomposed into further structured fields.  This would mean a NBC change to the "raw" representation in such a case.  I can provide a contrived example, if this is not clear.
> 
> Once the "what do you do with the bits" point is addressed, there's also the matter of how you ship it.  I find it peculiar that we seem to preference the human-readable forms for "raw" than the machine readable ones in most of our discussions.
> 
>> In addition, I think that if we wanted a more efficient solution that doesn’t require modelling two leaves, then perhaps this could be considered as a potential YANG Next issue.  I.e., is there is a small change or addition to a future revision of the YANG language (or encodings) that could allow this to be better handled.
> 
> IMO, permitting bit field aliasing where multiple names can refer to the same bit position would address this issue.  Good for YANG-next.
> 
> That said, I'm targeting the narrow use case of a small number of bits.  Such "raw" considerations break down under larger examples.  See above for such an example.
> 
> -- Jeff
> 
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod