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

Rodney Cummings <rodney.cummings@ni.com> Wed, 30 November 2016 23:14 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 813BF129BBD for <tictoc@ietfa.amsl.com>; Wed, 30 Nov 2016 15:14:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.922
X-Spam-Level:
X-Spam-Status: No, score=-1.922 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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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 Ua6XqtJGqpCK for <tictoc@ietfa.amsl.com>; Wed, 30 Nov 2016 15:14:14 -0800 (PST)
Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0093.outbound.protection.outlook.com [104.47.36.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3A2C8129BC4 for <tictoc@ietf.org>; Wed, 30 Nov 2016 15:14:10 -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=K7qRj04N1pjcW0jB/SpjdTHscdqWYXgY2Fzc2Mx20vA=; b=QY6r+nWVutVGi761LqBwR328RR8sbMAz6m5gjE4GUSSdD0tg3frhZjTR+HqtchFXkECYlWIvXYrdwdUbwbCFtayqcRwNKuCzN1OcW+95Hz++aW+K+Dq6xPBDb1Y26DLKu0Nz15ZNSm3ybAB1n1UUaWmIdUebPw9s9hn3WN2DmJw=
Received: from BN6PR04MB0548.namprd04.prod.outlook.com (10.173.201.137) by BN6PR04MB0548.namprd04.prod.outlook.com (10.173.201.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.734.8; Wed, 30 Nov 2016 23:14:08 +0000
Received: from BN6PR04MB0548.namprd04.prod.outlook.com ([10.173.201.137]) by BN6PR04MB0548.namprd04.prod.outlook.com ([10.173.201.137]) with mapi id 15.01.0734.020; Wed, 30 Nov 2016 23:14:08 +0000
From: Rodney Cummings <rodney.cummings@ni.com>
To: "tictoc@ietf.org" <tictoc@ietf.org>
Thread-Topic: Comments on YANG module of draft-ietf-tictoc-1588v2-yang
Thread-Index: AdJLTKZQlT1tfHzZSbOnrQkk8+eOSA==
Date: Wed, 30 Nov 2016 23:14:08 +0000
Message-ID: <BN6PR04MB054877D581139828C0543A94928C0@BN6PR04MB0548.namprd04.prod.outlook.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: [130.164.62.209]
x-microsoft-exchange-diagnostics: 1; BN6PR04MB0548; 7:tZ3fJ9Mru7HpUNewkQe06C3XSZyYqz+MWk5rPoI30TzXxquPwsCYPtd87XVdQIUk33AJLrNclS/+SOCOxKaKyMXkr5lfH3FhKyv/fO/Vv/RLWwyKQWV0C1g7vsJGB96JL89qXgk+Phz7iuIT1DYu2xvGaAeJViOOEGzRls30TY+3Bry6MZYVBsnnllXroVdP+pljm37Rr2RI76O+gBbk9Vd4mOut3VJKVK3UfftpFQjrKq/22L+ABUmEy0kbX76tKL01Ae2OumL5wI7FWqo4DpmjtTm8x29HngHaeOxy2RtRzwADMUscEfrN+Rn3bgjwqLMQfAu5qoUm5BDfpyu9RuZs0UzDlHfPhH+uhEZwp1c=
x-ms-office365-filtering-correlation-id: fc8e1335-c87a-4da3-f60a-08d41976968d
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN6PR04MB0548;
x-microsoft-antispam-prvs: <BN6PR04MB0548724BDB0469E59175D1D2928C0@BN6PR04MB0548.namprd04.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(166708455590820)(788757137089)(17755550239193);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(6072148); SRVR:BN6PR04MB0548; BCL:0; PCL:0; RULEID:; SRVR:BN6PR04MB0548;
x-forefront-prvs: 0142F22657
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(53754006)(199003)(189002)(39450400002)(66066001)(6116002)(6506003)(7846002)(3846002)(6916009)(102836003)(305945005)(7736002)(2501003)(97736004)(86362001)(74316002)(76576001)(1730700003)(8936002)(189998001)(50986999)(7696004)(54356999)(38730400001)(110136003)(2906002)(122556002)(5660300001)(2900100001)(5640700001)(33656002)(3660700001)(81166006)(107886002)(77096006)(9686002)(101416001)(2351001)(450100001)(3280700002)(81156014)(68736007)(99286002)(8676002)(39410400001)(230783001)(92566002)(106356001)(105586002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR04MB0548; H:BN6PR04MB0548.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: 30 Nov 2016 23:14:08.5080 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 87ba1f9a-44cd-43a6-b008-6fdb45a5204e
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR04MB0548
Archived-At: <https://mailarchive.ietf.org/arch/msg/tictoc/L7zjU290YcydJqZD65nnbxi6gz4>
Subject: [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: Wed, 30 Nov 2016 23:14:16 -0000

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