Re: [TICTOC] Comments on YANG module of draft-ietf-tictoc-1588v2-yang

Rodney Cummings <rodney.cummings@ni.com> Tue, 20 December 2016 15:45 UTC

Return-Path: <rodney.cummings@ni.com>
X-Original-To: tictoc@ietfa.amsl.com
Delivered-To: tictoc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C9FEB129AAE for <tictoc@ietfa.amsl.com>; Tue, 20 Dec 2016 07:45:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.903
X-Spam-Level:
X-Spam-Status: No, score=-1.903 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-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 Le1v-4JfFYae for <tictoc@ietfa.amsl.com>; Tue, 20 Dec 2016 07:45:57 -0800 (PST)
Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0125.outbound.protection.outlook.com [104.47.38.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 683A6129A8E for <tictoc@ietf.org>; Tue, 20 Dec 2016 07:45:57 -0800 (PST)
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=7lljvYEQomao2aquCYGTcPFWrufaA6eFhygAtUiqp6I=; b=cWHDi26UcfTG5uiyK4YGs4N5oQPbEGi8gZ4oj3ttLPxy0xDD1mD2fTIAhLr5jYLj1kBgXHbu9UEg0pd/LK8bDCo6iF0ApfxqfH0mUdcXHqxTRDvZObXdHzihfXGQlEy6jHA6fbQQk1TFNzfIiO1yRKWb2ABv5YTx3DaRj1OBEK0=
Received: from MWHPR04MB0559.namprd04.prod.outlook.com (10.173.49.136) by MWHPR04MB0559.namprd04.prod.outlook.com (10.173.49.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.789.14; Tue, 20 Dec 2016 15:45:55 +0000
Received: from MWHPR04MB0559.namprd04.prod.outlook.com ([10.173.49.136]) by MWHPR04MB0559.namprd04.prod.outlook.com ([10.173.49.136]) with mapi id 15.01.0789.014; Tue, 20 Dec 2016 15:45:55 +0000
From: Rodney Cummings <rodney.cummings@ni.com>
To: Jiangyuanlong <jiangyuanlong@huawei.com>, "tictoc@ietf.org" <tictoc@ietf.org>
Thread-Topic: Comments on YANG module of draft-ietf-tictoc-1588v2-yang
Thread-Index: AdJLTKZQlT1tfHzZSbOnrQkk8+eOSAPUKuuwAA4oXXA=
Date: Tue, 20 Dec 2016 15:45:54 +0000
Message-ID: <MWHPR04MB0559A68BC8D55D84DB58C93F92900@MWHPR04MB0559.namprd04.prod.outlook.com>
References: <BN6PR04MB054877D581139828C0543A94928C0@BN6PR04MB0548.namprd04.prod.outlook.com> <3B0A1BED22CAD649A1B3E97BE5DDD68BBAB014C9@szxema506-mbs.china.huawei.com>
In-Reply-To: <3B0A1BED22CAD649A1B3E97BE5DDD68BBAB014C9@szxema506-mbs.china.huawei.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=rodney.cummings@ni.com;
x-originating-ip: [24.155.176.125]
x-ms-office365-filtering-correlation-id: de6c0097-88bf-496b-3490-08d428ef48eb
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:MWHPR04MB0559;
x-microsoft-exchange-diagnostics: 1; MWHPR04MB0559; 7:htKm6nH5AgpBh5wEPGd4vuywWtc6RE90kSuChySdKgRq1SVBuyPkEhp60QOjdkeYkHfLm5bxHNiCIfZqUrwbpb1bAsR1pabhB6O03tumfN381mV7tneUMXwir584m/xjHFDx/h5oDpO6TVWKZjTe6LUl7t4lAuuW5i2U64R7d332Gy4BnVz1EWw/4BP73bxL67UobM+I8f0CXqu8C1NN7hnpTTYRbv/63Nx3GvGfodB3dti7wLgzznZidKnFG2iMWNsxSu6Ql2PdrG9H/Hy6Ra5j/nF7SUYaVv8l9NMianx8DY/Zx7T/dJLHMs8PTesCH/qjO++2VJ8PNSKHWIesvcb30LmvIbPM7Z6qlB9PlLPANuXbMLHJqfAx28qsCiEVB7zkfgN5CIaWIPFgVR8LQf/un6o94MiCKCL/d8yarqY2+7xgiw+jOhQiXMgcixMZ3GoelECoKx1/XYwplzBIFA==
x-microsoft-antispam-prvs: <MWHPR04MB0559271152192F5CB262A78892900@MWHPR04MB0559.namprd04.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(166708455590820)(50582790962513)(788757137089)(17755550239193);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(6072148); SRVR:MWHPR04MB0559; BCL:0; PCL:0; RULEID:; SRVR:MWHPR04MB0559;
x-forefront-prvs: 0162ACCC24
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(39450400003)(199003)(377454003)(189002)(53754006)(13464003)(99286002)(5001770100001)(3280700002)(3660700001)(106356001)(105586002)(76576001)(7696004)(2900100001)(107886002)(189998001)(97736004)(2906002)(50986999)(77096006)(2501003)(54356999)(38730400001)(6436002)(229853002)(86362001)(2950100002)(5660300001)(6506006)(25786008)(76176999)(101416001)(74316002)(33656002)(66066001)(8936002)(81156014)(8676002)(122556002)(81166006)(7736002)(3846002)(6116002)(92566002)(102836003)(9686002)(305945005)(68736007)(230783001); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR04MB0559; H:MWHPR04MB0559.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="utf-7"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: ni.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Dec 2016 15:45:54.9189 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 87ba1f9a-44cd-43a6-b008-6fdb45a5204e
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR04MB0559
Archived-At: <https://mailarchive.ietf.org/arch/msg/tictoc/_RASnlktMk4bgLHpnNhCj177nvw>
Subject: Re: [TICTOC] Comments on YANG module of draft-ietf-tictoc-1588v2-yang
X-BeenThere: tictoc@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Timing over IP Connection and Transfer of Clock BOF <tictoc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tictoc>, <mailto:tictoc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tictoc/>
List-Post: <mailto:tictoc@ietf.org>
List-Help: <mailto:tictoc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tictoc>, <mailto:tictoc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Dec 2016 15:46:00 -0000

Thanks Yuanlong,

I assume that you mean that you agree with suggestions 1-5 below. If so, and if others on the list agree, we can work offline to make the changes for Version 04.

Rodney

> -----Original Message-----
> From: Jiangyuanlong [mailto:jiangyuanlong@huawei.com]
> Sent: Tuesday, December 20, 2016 2:56 AM
> To: Rodney Cummings ; tictoc@ietf.org
> Subject: RE: Comments on YANG module of draft-ietf-tictoc-1588v2-yang
> 
> Hi Rodney,
> 
> The V3.0 YANG module file (ietf-ptp-dataset@2016-12-05.yang) was merged
> into:
> https://github.com/YangModels/yang/tree/master/standard/ietf/DRAFT
> You can comment and update this module more conveniently.
> 
> If a stable new revision is in shape, then we can update the WG draft to
> Version 04.
> 
> Thanks,
> Yuanlong
> 
> -----Original Message-----
> From: TICTOC [mailto:tictoc-bounces@ietf.org] On Behalf Of Rodney Cummings
> Sent: Thursday, December 01, 2016 7:14 AM
> To: tictoc@ietf.org
> Subject: [TICTOC] Comments on YANG module of draft-ietf-tictoc-1588v2-yang
> 
> Hello all,
> 
> I performed a detailed review of section 3 (YANG module), and I have some
> suggestions. I apologize to my co-authors for not raising these issues
> sooner (I was more focused on the other sections).
> 
> 1. Upload the YANG module to
> https://github.com/YangModels/yang/tree/master/standard/ietf/DRAFT
> 
> Now that this module is WG draft, I assume this is appropriate, and it
> will increase visibility with the YANG community.
> 
> 2. For data set members specified as "implementation-specific" in 1588-
> 2008, use the data type from clause 15.
> 
> The "implementation-specific" text refers to use of the data inside the
> implementation, and does not refer to management. Management needs a data
> type, and 1588-2008 provides this for its own management protocol (clause
> 15). This module should use the data type from clause 15, since YANG is
> another form of management. As a side note, the revision of 1588 is
> clarifying this issue, so use of the 1588-2008 clause 15 type will align
> in the future.
> 
> Details:
> - current-ds-entry.offset-from-master: Use TimeInterval as type (see
> suggestion #3, and 15.5.3.4.1.2)
> - current-ds-entry.mean-path-delay: Use TimeInterval as type (see
> suggestion #3, and 15.5.3.4.1.3)
> - time-properties-ds-entry.current-utc-offset: Use int16 (see
> 15.5.3.6.1.1)
> 
> 3. Create and use a grouping for each data type in 1588-2008 subclause 5.3
> (derived data type specifications).
> 
> 1588-2008 specifies a "struct" for many types, and the data set members
> use those types. We should repeat this practice in the YANG module for
> consistency, and to reduce duplication.
> 
> Details:
> - Create a grouping for TimeInterval of 5.3.2, and use that grouping for:
> 	* current-ds-entry.offset-from-master
> 	* current-ds-entry.mean-path-delay
> 	* port-ds-entry.peer-mean-path-delay
> 	* transparent-clock-port-ds-entry.peer-mean-path-delay
> - Create a grouping for ClockIdentity of 5.3.4, and use that grouping for:
> 	* default-ds-entry.clock-identity
> 	* parent-ds-entry.grandmaster-identity
> 	* transparent-clock-default-ds-entry.clock-identity
> - Create a grouping for PortIdentity of 5.3.5, and use that grouping for:
> 	* parent-ds-entry.parent-port-identity
> 	* port-ds-entry.port-identity
> 	* transparent-clock-port-ds-entry.port-identity
> - Create a grouping for ClockQuality of 5.3.7, and use that grouping for:
> 	* default-ds-entry.clock-quality
> 	* parent-ds-entry.grandmaster-clock-quality
> 
> 4. Update the description of instance-list.
> 
> It is correct to say that each instance represents a distinct domain, but
> not necessarily a distinct domain-number. To be clearer we could replace
> the description with:
> 
> "List of one or more PTP datasets in the device, one for each domain (see
> IEEE 1588-2008 subclause 6.3). Each PTP dataset represents a distinct
> instance of PTP implementation in the device (i.e. distinct Ordinary Clock
> or Boundary Clock)."
> 
> 5. Create and use a typedef for each Enumeration data type in 1588-2008.
> 
> 1588-2008 uses the data type Enumeration8 (or 16) for data that references
> a table of name/number pairs. As the 1588 standard evolves with each
> revision, new name/number pairs will be added.
> 
> The current draft uses a YANG enumeration for:
> 	* port-ds-entry.delay-mechanism
> 	* transparent-clock-default-ds-entry.delay-mechanism
> Since 1588-2008 has a single table for both, in the YANG we should create
> a typedef for this, and use that typedef for both data set members.
> 
> The current draft uses YANG "uint8" for other enumerations in 1588-2008.
> We should consider creating typedefs with an enumeration for those as
> well:
> 	* port-ds-entry.port-state
> 	* time-properties-ds-entry.time-source
> 
> Other modules seem to use YANG "identityref" for enumerations (e.g. draft
> 802.1Q modules), but I admit to ignorance as to why. I would like to
> understand the advantages/disadvantages of enumeration and identityref, to
> help ensure that we are using the best type for 1588-2008.
> 
> Rodney
> 
> _______________________________________________
> TICTOC mailing list
> TICTOC@ietf.org
> https://www.ietf.org/mailman/listinfo/tictoc