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

Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de> Thu, 26 January 2023 22:40 UTC

Return-Path: <jschoenwaelder@constructor.university>
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 3736CC15171B for <netmod@ietfa.amsl.com>; Thu, 26 Jan 2023 14:40:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.649
X-Spam-Level:
X-Spam-Status: No, score=-6.649 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-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 (1024-bit key) header.d=jacobsuniversity.onmicrosoft.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 ogEDlmbnHDsQ for <netmod@ietfa.amsl.com>; Thu, 26 Jan 2023 14:40:45 -0800 (PST)
Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2074.outbound.protection.outlook.com [40.107.8.74]) (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 02605C151554 for <netmod@ietf.org>; Thu, 26 Jan 2023 14:40:41 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XPlox6+2ekUWBR1V5UZuUKXgqLJ7Z+Q+PQtETQGWeLzHQczZ0MXfQouaMhioyJGuuhx2/ygmL8bIy331H3PTZQ576wvEpgXZklwemAd0W/oEDAdYwLwhnmr0mBfs2x3tNx3urKntmGInfAyOBPyRh+s49OSur0lVfq9g2PFvHlEgWCpwfo5qXJVNmpbvOsAtJjPimfhlSljFhexrHI6Z3NwQCXsm73a7i0RIxWpLpv/4HHjEVFBo9jLilqQedGRE6PN5XeB+eRzJegoVqgjFiEfUgpNIj9m9b6MFk3Gu0SLGKzi222F/F5KVZsnwch64GuluwtwXggj4TKx/BSW1pA==
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=UivFeiHu9xx4Lie92MJ7G2A6BBvnMbB2nc1oWI4h1Vk=; b=bCO9/m8u4RsA5dksF+vAau8MfVcoFIKjVlTE8oELGzYx0Sp+6sfLRv00AlYK85Pth6tRLoC9AuH7mRUrReZHQFxh2xsJKyzymWFB5ezHVqHdB6zMVOYxZfUtafqlF/JqsRNSWWsP4Gq9FBvusid7Ib45DrxIqr4lr6SkK0AbN6WmD1+hjevHZ0WLXjI2kg7UrcKmyIYMwyLsqSmddLFAwHrn/ymQmqMruoPZbHRKT+V334yZ92NoEiIZMlAv+jhD9c2cWZMU4qw86AII2elBeuZuY6tgYkL7rx0lmxpXyO/khPgmk0IU6Ys6J0sRrF0tWKbyGl96CjMLL7fqbMHt2A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=constructor.university; dmarc=pass action=none header.from=jacobs-university.de; dkim=pass header.d=jacobs-university.de; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jacobsuniversity.onmicrosoft.com; s=selector2-jacobsuniversity-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UivFeiHu9xx4Lie92MJ7G2A6BBvnMbB2nc1oWI4h1Vk=; b=PC2B5WzR2XuAISNgM7G6x6zsRuEtxAx/q2ChOC29UXX2QpYqOoSZ5fQkG2ZOX+xh0LoCnOtwPp8gLyUP2z8/yC5QQqjVRm1WxLh0dkZw3abveOzH7S0uYgZmUVqt+VLLz5ld8AZt40QCKfnMe8Zi3y7DFIBFBdd6MbF0BigAJR4=
Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=jacobs-university.de;
Received: from GVXP190MB1991.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:3::6) by DB9P190MB1868.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:37f::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.22; Thu, 26 Jan 2023 22:40:34 +0000
Received: from GVXP190MB1991.EURP190.PROD.OUTLOOK.COM ([fe80::9c2e:527:d0b2:f570]) by GVXP190MB1991.EURP190.PROD.OUTLOOK.COM ([fe80::9c2e:527:d0b2:f570%9]) with mapi id 15.20.6002.033; Thu, 26 Jan 2023 22:40:34 +0000
Date: Thu, 26 Jan 2023 23:40:33 +0100
From: Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de>
To: Jeffrey Haas <jhaas@pfrc.org>
Cc: netmod@ietf.org
Message-ID: <20230126224033.wmogu3borbctlcaz@anna>
Reply-To: Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: Jeffrey Haas <jhaas@pfrc.org>, netmod@ietf.org
References: <20230126205157.GC27893@pfrc.org>
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20230126205157.GC27893@pfrc.org>
X-ClientProxiedBy: AM3PR04CA0142.eurprd04.prod.outlook.com (2603:10a6:207::26) To GVXP190MB1991.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:3::6)
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: GVXP190MB1991:EE_|DB9P190MB1868:EE_
X-MS-Office365-Filtering-Correlation-Id: 7814902e-7e65-4b0c-7ab0-08daffee5661
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: 6h0nMGOYQFns86yUYnfjujBXF+HC1n7HPS0TtK+4i70SHgG8U+WoAW9s52V0WyXvmsGSHz5Tn2ngrkqcoIxF9RBBxTayiepOqA4PoEIGGDW1iSdQIUbXrbMg9JGZSaND0pIlN9sjoxhcCfMfoWHnyntdqWNx+pHMsS+2NzoARjs1JoP6BRbo7m0ZdDWwgSYKZn4XSKmj37pAX1pHc5EbjIXQgRt/OqLOQge9IoigiwkAcI7WVJNrb54isu/o1TmDqt8Mm43Z6XKP7FbrZdU99oVOMQC3nUmoxX0MQq4rnpLaNEaueLnf70CpSgqYnjxgt+E6KM7hr2ZvP97GW66c2LLXcTImO6wA9g1OaYfNt2bhliXTHqXPzCP4SaHs93+RtRdWcCMCVDDhNA5vo8HyMwp7wtUdxvdVicu4ADhnCnJlBSAb6HRwcfHfT5bBWd8WJYDt/bFofhnt1BMpJQVLpm8LDQOHx5Je45MiSCrCBjci+ym3f4wrK+ABdDyNOwQEU4Lx1I2oPUwmJtnCJA702zQgCkNXkoePkl4CQlOZhDCfJHYZpiS+7u/JWnOESuIkKvwYAu/OP/vokw8GT7CYWFWlScbJPvuuUVWeXSEyDq967LAAxa7qMCOzAlrvI5u+FEKueHeCwdu24aWAwnX2Vtu9vdUMmrotF5kVOkw78NE/TRsgPuWzilv6mc7MvhyFmytLroA43RhRv/vpYHIzNPhKywbb9vk5vslcUO9WhD8=
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GVXP190MB1991.EURP190.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230025)(7916004)(346002)(366004)(39860400002)(376002)(396003)(136003)(451199018)(85182001)(478600001)(6486002)(52116002)(83170400001)(41320700001)(40140700001)(38100700002)(38350700002)(186003)(42882007)(83380400001)(33716001)(6506007)(85202003)(9686003)(1076003)(5660300002)(26005)(6512007)(2906002)(3450700001)(786003)(316002)(8676002)(66946007)(8936002)(6916009)(41300700001)(66556008)(66476007)(4326008); DIR:OUT; SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: lXVsiCyOf4h0U5LWMxpMkG7uxMqjYfJH25/WLc0sqBewNO3IpCjNd0N6oLn6CINCMNRTi1MPeDqnRc4GgXCpaeALXaGt/3ROzHCG2IcYuhSkbOCqMO9B+XOh9JgLVKQbCXRoOgvdKSBBgJ8UTUKfpZGWjngXWEQX49xcWmJHtzRXlLx+VYIvJ0iWTUAM7FYUdgLx2fuR1TFQSO7oMYw2Sp4SUAj2WRyVFIMYh0KXvDfScPvqzBGdHVXIt/KdgJtcWv6JJeSFo3xFn4eOaGlSqjEMftxxQwS0tZlPszkLAgytoB0DMjxDSyhY5AoRU+6VQQGNf69CeGlz4gDC+3G2lVedhNy/mbX8N+2ndB1CQ+1jrLb5HWCvqkDAj+Rg98r8j5UNu8FZl9p7NDUO2Yg3oqDjstdHQnRifRMEcJ9wO0TSXoWaOEj5sp8+pZEwFnDcAyVDvY2jvfAtSKCihbWNwiAzsUdhWGUuIeL1uT9RuGlToLVumQz+zE1O29Zu7F+nPq4BLnKEz1zPq1Zxa3RSl0WPbwQidwkaKiobJi9Ct9DLNLc6+iXDDGSHX4bqjL31/uD2pg73ZWBy8ZsdcPyfzAYpkFzj/tPWuU7zv0xGMIL/WAF8Kz+SHTdurichgrKEcQyV72GaByJt/Q/TiALZ/hLquR4Ivfzz8aUnP6laIAXnv5QzWxTDbYvVBFeLHUtjTNIiSNUVTMZGx95qg4MrA23uqV+cnRoQZmwxGZc28H8XzJ7qsOLHpnEII4u6Ls8wCgmktQc7OYtyPPoTWjAoZgOjnwgNXQKW4rI+v4BG6UgHDkWiDrrViv0nWANgzFZywl4MDd8MtnymxFv9YbC78LuMioGZ9QSIhwmU6KaWyxoNL6hRf5jNN07JVD20hfDk71DzTql1EFjvnyhNvFjMMr5PZ/3zfUDS2st9Zqt0QZGG4Mzw9uHAkTzNwo6YIDUx+CNTkaZlkywgS4TtOHzT1zjG6gMuKDbqrTx3flIgV8tau9Cwlfpx8tb1XahJ2rTW2xWX4DX5sgCPZdodZkr+jhbwqGCv5eiN6AgAXgLYW9Ts9axQwEWvrkl6kwDclJxlVANxNOwZ8qWrUXFYHkhMQWozkwRB1APrSekRlq8Cq/I+bz7+tT58nU/Svh9F0sy1fjxVnk/+JWZlDC+N9AeOaWuXEHNqgEypwPiPXCQ17CD2dQHc0PEyIMyJ9qeHl3a0AQYh2t6JIzyRIo6408VOplp1Q1gATMMl0JM7Gs2qkqi7Slorm1JXq12BLeFwYK44Zbp+hg9h322j7Ww9+CybTvbUjhHA0opQWyXtBonVsc82h9+tKGin/iO0JU5NxKe15a0tFYraekWI9ZZ7mfQPhWEy4Z4tEnuKfufB/K+MV7LEeNFlFx7woAq1NReECk/lzqZn6QDNrlHQRnayytyxDnZBOigFtH2idRWKRnoTplkNW4AJQYLWdtia1W71yHNgb8QjQbWoUCqA7VRJ3zNq8dcfWANdbJJajyWBwkBZjJg8OcTfBMyYTXypNcGYe4RZdGuPpoAW2qEbSPZ0dVcyLmXL8qCuLExmsq67yBJyqK4hX9GM/JJ7Khmu8GTBt89FBXe3+z8yw9RXBqwg0HXNr9l4mrunfZ7RKGA7S8wO1xU=
X-OriginatorOrg: jacobs-university.de
X-MS-Exchange-CrossTenant-Network-Message-Id: 7814902e-7e65-4b0c-7ab0-08daffee5661
X-MS-Exchange-CrossTenant-AuthSource: GVXP190MB1991.EURP190.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2023 22:40:34.5374 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: f78e973e-5c0b-4ab8-bbd7-9887c95a8ebd
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: Z9w8ffQhP4pzyS/XhqRPOgNzCIUmksdYJvbMZuhUryL9Hei+hZNRFRIh2rnneSipDh623qS1c7pnc23SHDgyw6oBtRWDaDjyFvMyODsno8k=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9P190MB1868
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/YjD6gRDstlgOzUhV7iow9mUmUyw>
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: Thu, 26 Jan 2023 22:40:49 -0000

On Thu, Jan 26, 2023 at 03:51:57PM -0500, Jeffrey Haas wrote:
> 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.
>

Disclaimer upfront: I did not read the discussion on the yang doctors
list that resulted in this document.

- I suggest to avoid talking about displaying data, the verb 'display'
  is never used in RFC 7950.

- In the scenario, you seem to model the 'bits understood by the BGP
  engine' and the 'unknown bits presumably ignored by the BGP engine'.
  Having two separate leafs for this seems to be fine.

   <flags>restart</flags>               # what the BGP engine understood
   <unknown-flags>b1</unknown-flags>    # what the BGP engine ignored

  Obviously, the presence of <unknown-flags> indicates that there were
  unknown (presumably ignored) flags.

- Note that exposing bit-fields may be a slightly different thing,
  i.e. exposing the bits understood by a BGP engine and the bit-field
  contained in a protocol message received by a BGP engine should
  likely look like this:

   <flags>restart</flags>               # what the BGP engine understood
   <raw-flags>b0 b1</raw-flags>         # what was received by the BGP engine

  Obviously, raw flags would always be present and for wider bit-fields
  one may choose types giving a more compact representation.

- Concerning the type definition, I suggest to simplify the
  description statements:

  OLD

          "Bit 0 currently has no known mapping for this state.";

  NEW

          "Bit 0 is unknown";

  And since there can be many unknown bits, I would probably just name
  the bits b0, b1, ... instead of unknown-0, unknown-1, ....

/js (old fashioned person with a fable for 80 column terminals)

-- 
Jürgen Schönwälder              Constructor University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>