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

Jeffrey Haas <jhaas@pfrc.org> Tue, 22 August 2023 14:17 UTC

Return-Path: <jhaas@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 A90CBC15107D for <netmod@ietfa.amsl.com>; Tue, 22 Aug 2023 07:17:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.91
X-Spam-Level:
X-Spam-Status: No, score=-6.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] 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 4_3irpu96vcB for <netmod@ietfa.amsl.com>; Tue, 22 Aug 2023 07:17:24 -0700 (PDT)
Received: from slice.pfrc.org (slice.pfrc.org [67.207.130.108]) by ietfa.amsl.com (Postfix) with ESMTP id B1703C14CE4F for <netmod@ietf.org>; Tue, 22 Aug 2023 07:17:24 -0700 (PDT)
Received: from smtpclient.apple (104-10-90-238.lightspeed.livnmi.sbcglobal.net [104.10.90.238]) by slice.pfrc.org (Postfix) with ESMTPSA id B339A1E2D5; Tue, 22 Aug 2023 10:17:23 -0400 (EDT)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.3\))
From: Jeffrey Haas <jhaas@pfrc.org>
In-Reply-To: <B39FEA6E-EA4B-448A-8CE1-DB7AAAD92991@tail-f.com>
Date: Tue, 22 Aug 2023 10:17:23 -0400
Cc: "Rob Wilton (rwilton)" <rwilton@cisco.com>, Italo Busi <Italo.Busi=40huawei.com@dmarc.ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <08BBEC66-DEF9-40B2-9FBD-4A70E2988892@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> <B39FEA6E-EA4B-448A-8CE1-DB7AAAD92991@tail-f.com>
To: Jan Lindblad <janl@tail-f.com>
X-Mailer: Apple Mail (2.3696.120.41.1.3)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/MSX5_KBp3raJDZeskQ68yMCS75w>
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 14:17:25 -0000

Jan,


> On Aug 22, 2023, at 4:07 AM, Jan Lindblad <janl@tail-f.com> wrote:
> The recommendation I would give for modeling bit fields with reserved bits is to not model them as the YANG bits type.

I think I've unfortunately caused this thread to fork in a non-productive fashion. The unknown-bits proposal discusses primarily what to do about unassigned bits in flags fields.

Similar considerations in terms of NBC modeling for the contents of RESERVED fields similarly apply.  I'm going to reply to the remainder of this message solely from that context.


> 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.

I would not make that recommendation.  Unless you know the underlying contents are a given type, something that handles representing that state opaquely is the best you can do.

> 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.

This is fine.  As you slice off portions of reserved for new state, you add new leaves that model that new state appropriately.

What remains unanswered is what you'd do if you wanted to model the contents of that RESERVED field over the transition process.  Let's do a single theoretical iteration:

Our mythical protocol has a 16-bit RESERVED field that is octet-aligned in the PDU, just to make this easy.

If the model author wanted to represent the contents of that field at all for state purposes, how best to model that?  Some options:
1. We know it's 16 bits, so just make it a uint16.
2. We don't like 1 because uint16 implies that it has a type, so we model it as a bounded hex-string.
3. We don't like the IETF hex-string format because the consumer of this thing is a machine rather than a human, so we make it a bounded binary.

All three of these are fine.

An update to the protocol then slices off the lower octet for a new field that's a uint8 type.  We can model that as a new leaf fine.

What then of the "reserved" leaf?  Some impacted properties:
1. It's no longer describing 16 bits of data.  At best, it describes the 16 bits of data that now includes the new leaf.  You have overlapping noise in the model.
2. You shouldn't shrink the existing leaf as that's NBC.
3. It's arguable you don't want to mask out the new field from the reserved field as that's exactly as NBC as the bits conversation we're having.

Other options?
1. Obsolete the existing leaf, create a new one.  reserved2, reserved-20230813, reserved-iana-foo...
1a. pray that you don't have the options to have forking features.  If so, you might end up in combinatoric if-feature hell if you wanted to capture the various options.
2. Leave it alone.  It's historical noise, even though the property impacts above are relevant.
2a. When all of the reserved space is finally allocated, obsolete the leaf.

Thus, we have similar considerations for non-bit RESERVED fields if we have any interest in modeling them.

If the Working Group prefers to make that the actual issue rather than solely the bits scenario, that's perfectly reasonable.

> 
> 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 :-)

I certainly don't need to be convinced of this point; see my comments about tcpdump and YANG.

-- Jeff