Re: [netmod] draft-ietf-tictoc-1588v2-yang-05: port-number

Rodney Cummings <rodney.cummings@ni.com> Tue, 03 October 2017 18:24 UTC

Return-Path: <rodney.cummings@ni.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 E49CC134FCA; Tue, 3 Oct 2017 11:24:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nio365.onmicrosoft.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3DiIohfbcyIc; Tue, 3 Oct 2017 11:24:22 -0700 (PDT)
Received: from mx0b-00010702.pphosted.com (mx0a-00010702.pphosted.com [148.163.156.75]) (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 154DC134FC6; Tue, 3 Oct 2017 11:24:22 -0700 (PDT)
Received: from pps.filterd (m0098781.ppops.net [127.0.0.1]) by mx0a-00010702.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v93IKMBX005400; Tue, 3 Oct 2017 13:24:20 -0500
Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp0018.outbound.protection.outlook.com [216.32.180.18]) by mx0a-00010702.pphosted.com with ESMTP id 2dcfp4g2kc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 03 Oct 2017 13:24:19 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nio365.onmicrosoft.com; s=selector1-ni-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=hxIWRnDWa65EIDl1c6AqhIfFZncxNRA42UoAawJpgdM=; b=hiLMbA+fdNOYQl4VCtmwd7HHxqo/9neO+YJOIIU9BHCc0EDK1asdrpFEyk88KFfBM9pqhp69hRDq2gm5XOEkB4CsAhrP9v3htSGi8WX9UFoOIRMssXapUj9q0dZWtz5dMRpMhUek4oBfIaowJas0aT+eVoY+Y/vTrMKnIb4dSQA=
Received: from DM2PR0401MB1389.namprd04.prod.outlook.com (10.160.219.156) by DM2PR0401MB1392.namprd04.prod.outlook.com (10.160.221.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Tue, 3 Oct 2017 18:24:17 +0000
Received: from DM2PR0401MB1389.namprd04.prod.outlook.com ([fe80::b172:affa:cf1d:384e]) by DM2PR0401MB1389.namprd04.prod.outlook.com ([fe80::b172:affa:cf1d:384e%18]) with mapi id 15.20.0077.016; Tue, 3 Oct 2017 18:24:17 +0000
From: Rodney Cummings <rodney.cummings@ni.com>
To: Martin Bjorklund <mbj@tail-f.com>
CC: "tictoc@ietf.org" <tictoc@ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] draft-ietf-tictoc-1588v2-yang-05: port-number
Thread-Index: AdM7naceqW92Otk+TBSUBZ12gBb0TQADKMgAADGI7JA=
Date: Tue, 03 Oct 2017 18:24:17 +0000
Message-ID: <DM2PR0401MB1389477D61B90ED604E7EF0F92720@DM2PR0401MB1389.namprd04.prod.outlook.com>
References: <DM2PR0401MB13896A98E4D5799F369EB71C927D0@DM2PR0401MB1389.namprd04.prod.outlook.com> <20171002.201430.1078877259363120382.mbj@tail-f.com>
In-Reply-To: <20171002.201430.1078877259363120382.mbj@tail-f.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [130.164.62.43]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; DM2PR0401MB1392; 6:WAZVXN1MV8W/XZZDtYh+Sni28gtAZa7DH95PsVLnFZmnkgmQiWlaToy3T4kf8rg6kfGZMHbcZuPQOm6O3qzZXWS9YkRNY5GVgl2LSmH6cMU3jNCAQCRvmpIZcvzrVtkggS6X144mdutqvufOMIBDnxNU5su8JZXpYFv8MjTkySmkkKrt9TU1dKj6ZRPCC+ClvNuaUauKlAZl7MgvxvzZzTwfV53zrHJJtlIF0S6ytKcuJvkqamLpuCK5DndL/ooSnkq01IlCyW/ObuPodfP6qpJ+xEEp6rTr/oJnelFTjh8EGI/9y4dwtMONZouVrrlPD955XenuLunjThRxDCc1YQ==; 5:NwkrQ4tucDvMX9xlqpM0XqPf+3sXSPtvgAzri7axr8fBu5OcpAUOKJWSuJjS5lP7ggy9qTFc+YbSavFs9jjGpqAtlNw5BTWy9Alw9yxAj0rjqhrggZQTfTq0rYS6WsA/cFTyeih7hg5YPCkEdlK6Yg==; 24:/bQCkzJ2hIh0nzdKR3yn9i6Qeahi/DruyXraAq1lX5n+zr7NYcQzBfFWSOvk73IGhXGC4rh2bhdIZQrx2gWu8pNZNvuFd+5NY6yAizlT474=; 7:uOLysw97HuQqYvAvu2UPk1hOzX3iofwcU7FibQX6Hw739l5yDZH5zObMhugYZ90Gt1yzpvgvpa6EuTQYLaNJF12PxqU+h/vL4Thuv1B7ZpkCCGuRyH7xuKaUiZHztxojegViN32oocvMUB+PMvF8bHxe2oDVL8hlMSjnIaneSsfhR//Iz5ujiJk+MsId+7JDvX8HolUMFTIzqcoqbRMiMcA75G2waQa+xzMZrV13TiU=
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: fe83d4fe-6c0a-49ac-afae-08d50a8bf58b
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DM2PR0401MB1392;
x-ms-traffictypediagnostic: DM2PR0401MB1392:
x-exchange-antispam-report-test: UriScan:(10436049006162)(145744241990776);
x-microsoft-antispam-prvs: <DM2PR0401MB1392E874046252711E3876F092720@DM2PR0401MB1392.namprd04.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR0401MB1392; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR0401MB1392;
x-forefront-prvs: 044968D9E1
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(376002)(346002)(199003)(377454003)(51444003)(13464003)(189002)(24454002)(105586002)(2950100002)(74316002)(5660300001)(8676002)(6436002)(6916009)(81166006)(81156014)(7696004)(14454004)(50986999)(2906002)(54356999)(76176999)(3660700001)(6506006)(3280700002)(8936002)(25786009)(66066001)(229853002)(4326008)(3846002)(6116002)(102836003)(101416001)(33656002)(106356001)(966005)(478600001)(305945005)(7736002)(97736004)(99286003)(55016002)(53546010)(575784001)(230783001)(54906003)(9686003)(6306002)(2900100001)(53936002)(5250100002)(86362001)(6246003)(316002)(68736007)(189998001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR0401MB1392; H:DM2PR0401MB1389.namprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
received-spf: None (protection.outlook.com: ni.com does not designate permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: ni.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Oct 2017 18:24:17.7534 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 87ba1f9a-44cd-43a6-b008-6fdb45a5204e
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0401MB1392
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-10-03_07:, , signatures=0
X-Proofpoint-Spam-Details: rule=outbound_policy_notspam policy=outbound_policy score=30 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=30 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710030259
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Sdq0gM_jTlG4dP9yQ1zWVwduRm4>
Subject: Re: [netmod] draft-ietf-tictoc-1588v2-yang-05: port-number
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
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, 03 Oct 2017 18:24:25 -0000

Thanks Martin,

Your rationale sounds reasonable to me. We can use the description to
explain differences in the models for the reader. 

Your rationale got me thinking a bit about clock-identity. The 1588
information model and protocol uses clock-identity as a member of
port-identity (along with port-number). Nevertheless, that
instance-list[instance-number]/port-identity/clock-identity 
is equivalent to instance-list[instance-number]/clock-identity
(part of grouping default-ds-entry in draft-ietf-tictoc-1588v2-yang-05).
So... we are currently repeating clock-identity as we repeated
port-number. If we apply your rationale, we can remove that
repetition as well.

I propose that we go with Option 2, but without using a grouping,
and use the same approach for clock-identity. 

This would look like:

list port-ds-list {
   key "port-number";
   leaf port-number {
      description 
         "Port number.
          
         The data sets (i.e. information model) of IEEE Std 1588-2008
         specify a member portDS.portIdentity, which uses a typed 
         struct with members clockIdentity and portNumber.

         In this YANG data model, portIdentity is not provided as
         a container, but both of its members are provided as a leaf.
         portIdentity.portNumber is provided as this port-number leaf
         in YANG. portIdentity.clockIdentity is provided as the
         clock-identity leaf in the instance (i.e. ../../clock-identity).";
      type uint16;
   }
}

Rodney

> -----Original Message-----
> From: Martin Bjorklund [mailto:mbj@tail-f.com]
> Sent: Monday, October 2, 2017 1:15 PM
> To: Rodney Cummings <rodney.cummings@ni.com>
> Cc: tictoc@ietf.org; netmod@ietf.org
> Subject: Re: [netmod] draft-ietf-tictoc-1588v2-yang-05: port-number
> 
> Rodney Cummings <rodney.cummings@ni.com> wrote:
> > Hi folks,
> >
> > One of the last topics that we need to resolve for WG Last Call of
> > draft-ietf-tictoc-1588v2-yang-05 is the representation of port-number,
> > which serves as the key to the list of 1588 port data sets
> > (i.e. port-list). I've had some offline discussion with IEEE 1588 WG
> > members, and I'm copying NETMOD members for YANG expertise.
> >
> > I think we can narrow the possible options to two, so I'm starting a
> > new thread to focus on those.
> >
> > IEEE Std 1588-2008 is the time sync standard that specifies the
> > information model on which draft-ietf-tictoc-1588v2-yang-05 is
> > based. In IEEE Std 1588-2008, subclause 5.3.5 specifies the following
> > data type to identify each logical port in the 1588 product:
> >    struct PortIdentity {
> >       ClockIdentity clockIdentity;
> >       Uinteger16 portNumber;
> >    };
> > IEEE Std 1588-2008 uses this data type as the "portIdentity" of the
> > port in its on-the-wire protocol, state machines, and so on. In other
> > words, in the 1588 standard itself, portIdentity is a "real thing"
> > with real implementation.
> >
> > IEEE Std 1588-2008 also specifies a list of logical ports in each
> > "clock", and portIdentity.portNumber is used as the key to that list
> > of ports.
> >
> > In the YANG of draft-ietf-tictoc-1588v2-yang-05, we use YANG-style
> > names (e.g. port-list, port-number), but otherwise we've tried to keep
> > consistent to the IEEE Std 1588-2008 information model.
> >
> > We have a challenge with port-number. If YANG represents port-identity
> > as a container within port-list, YANG does not allow a key to be a
> > leaf within a container, so we cannot use port-identity/port-number as
> > the key to port-list.
> >
> > It seems that we have two options:
> >
> > Option 1: Use a leafref
> > ---
> >
> > YANG summary:
> >
> >         list port-ds-list {
> >           key "port-number";
> >           leaf port-number {
> >             type uint16;
> >           }
> >           container port-identity {
> >              leaf clock-identity {
> >                 type clock-identity-type;
> >                 config false;
> >              }
> >              leaf port-number {
> >                 type leafref{
> >                    path "../../port-number";
> >                 }
> >                 config false;
> >              }
> >           }
> >         }
> >
> > This has disadvantages from the YANG perspective, in that port-number
> > is duplicated. The "config false" is intended to mitigate YANG
> > implementation challenges, such that only one value of port-number is
> > provided for configuration.
> >
> > Option 2: Use a grouping
> > ---
> >
> > YANG summary:
> >
> >      grouping port-identity-grouping {
> >        leaf clock-identity {
> >          type clock-identity-type;
> >        }
> >        leaf port-number {
> >          type uint16;
> >        }
> >      }
> >      list port-ds-list {
> >        key "port-number";
> >        uses port-identity-grouping;
> >      }
> >
> > This has disadvantages from the 1588 perspective, in that it is not
> > possible for a 1588-aware management client to "get" portIdentity. We
> > are removing a 1588 "real thing" from the data model in order to
> > accommodate a syntax limitation of YANG.
> 
> I think that in general when you go from an information model to a
> concrete data model, you need to adapt to the data modelling language
> you are using, and this will in most cases mean that there will be
> some differences; in some cases the data model structure is different,
> and in some cases the data model will result in a more detailed
> model.  How keys are specified is one such example.  If you were to
> use SMIv2, you'd have to change the names (so that they are unique),
> and you'd have to map the structures to conceptual tables.
> 
> Clients need to understand the data model in use (not just the
> information model behid it).
> 
> > Question for NETMOD experts
> > ---
> >
> > My personal preference is Option 1 (leafref). Nevertheless, if the
> > "config false" does not provide sufficient mitigation for today's YANG
> > implementations, we can go with Option 2.
> 
> I don't think any implementation would have any problem supporting
> option 1, but it does look a bit odd.  Also, it only "helps" if the
> client is getting the data using <get>, but it will not help if it is
> using <get-config>.
> 
> 
> I think that the cleanest solution is to not try to completely mimic
> the structure from the information model, but make sure that the
> text in the description statements make it clear that the data model
> looks different compared to the information model, in order to help
> the readers.
> 
> 
> 
> /martin
> 
> 
> 
> >
> > Feedback is very much appreciated.
> >
> > Thanks folks,
> > Rodney Cummings
> > Co-author draft-ietf-tictoc-1588v2-yang-05
> >
> > _______________________________________________
> > netmod mailing list
> > netmod@ietf.org
> > https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__www.ietf.org_mailman_listinfo_netmod&d=DwICAg&c=I_0YwoKy7z5LMTVdyO6YCi
> E2uzI1jjZZuIPelcSjixA&r=WA71sf2o7Dw7CbYhFt24DPjt3lJuupswWYdnboKbZ8k&m=HQ-
> S1mMpOcwPGLxrc9fTcSPc3vMBTRPINVlW5icLVhI&s=vW2fbaZlyBrALsCxc0EC961aVU3t5gm
> DrURSXdnPR8A&e=
> >