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

Rodney Cummings <rodney.cummings@ni.com> Mon, 02 October 2017 17:34 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 DFEA3133039; Mon, 2 Oct 2017 10:34:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.601
X-Spam-Level:
X-Spam-Status: No, score=-2.601 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] 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 VUfxYcM-mKsj; Mon, 2 Oct 2017 10:34:10 -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 6BD8413301C; Mon, 2 Oct 2017 10:34:10 -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 v92HIQVE031399; Mon, 2 Oct 2017 12:34:09 -0500
Received: from nam01-sn1-obe.outbound.protection.outlook.com (mail-sn1nam01lp0114.outbound.protection.outlook.com [207.46.163.114]) by mx0a-00010702.pphosted.com with ESMTP id 2dbsr783hj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 02 Oct 2017 12:34:08 -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=LdjFlDWkcrDphXJL5i9bOqDal4rFkfkqmnhMFBcbLRg=; b=R+EMdh8MA7ARHpDbU+Kob/s4kT8e2sZvz9y8QWbo/txzrRYIOjHQIX9uIerYoMpFAw8xd8hsNegDemfXqSeCSUn7xfg9rkokMWZabEkvEpuUbJnl1eoYfwra2JnTZ++ro1Xt+C/PCa90WqIbzNc76xtS70op9wpTR5Euu2C8wpM=
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; Mon, 2 Oct 2017 17:34:06 +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; Mon, 2 Oct 2017 17:34:06 +0000
From: Rodney Cummings <rodney.cummings@ni.com>
To: "tictoc@ietf.org" <tictoc@ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: draft-ietf-tictoc-1588v2-yang-05: port-number
Thread-Index: AdM7naceqW92Otk+TBSUBZ12gBb0TQ==
Date: Mon, 02 Oct 2017 17:34:06 +0000
Message-ID: <DM2PR0401MB13896A98E4D5799F369EB71C927D0@DM2PR0401MB1389.namprd04.prod.outlook.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:GUGnldwpr0AMAAgIf0YpNLvg/qGKbxpITTUuN+rpV/PBvocCC+IkhqAb0ZeEMJZLAeMYZ+2Oal70EFll7rwdrB+WI3l9PqZsp1T5XFj+CyV2AGhnoAri/MuzF7Il/BACsuI6CEt0iJVhKqKYQLFoA1h3ljz3qu3FVenfgnYoM1MdH+0a6eKg+eQhMKIpmuqZ3t4Jc/0Flg7MlG1WppIDB/0Ks4QwoKtwrQ3KmqqpgovcECLoHHLopnBornZ8LOoT86uGu3oakbH3oN57ResQAO/9YXyk7W5J5aUWd0G6Stm7g0lHWw9H732mTrIsYg5WKQpQsZU/loRdVIO2FWBOkg==; 5:zVcA6ffUlqoAOq/h4AcyUH31MUzauED96QMLygIGHvna9ry63KHwNZOtnhKq/8x7TbCODgmTJy+OOpncx//+4bec6T2cowhUT/n8pkvqSTZiUqkV/9LJkVz/MB96wUwaO60SKs3YOfI8V2dDXxpEyA==; 24:94NHTOc1It5jdOcX4agGaWZlseRRdFIitTvCcL9sGGeC5Wrx1gfNoNf4wxKgbRc0N1eGCugNnYmIox7DQ+rKshoZh+Nm5oHpJLJUiwCBriA=; 7:Rwr1ymVSTWphuqWWjae0n26Y4/6K5yrD0ReZrJx4Vvh6EyhSFRTPKlJe5ZnytOQr3iqbZC8cR3hWuBKv48Rr4SzUIEmAD9dibuLQv8pCMJ8qMctB6pHR0uLrQtJIlfOYpHa4N7iEPCW71l5HGpstqj/FqBUr7pjfCoAuTKUqGxwl4HQITbbqSIr8MWHkY74vEsoCvPLUre355ll9oG0HaMkh32i+OixOZfLSG8P2MrY=
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: bb925758-a33c-4190-8618-08d509bbc81e
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:;
x-microsoft-antispam-prvs: <DM2PR0401MB1392BF66F9C1A4B058A1D5BB927D0@DM2PR0401MB1392.namprd04.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(6041248)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(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: 0448A97BF2
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(346002)(376002)(199003)(189002)(5250100002)(101416001)(14454004)(5660300001)(25786009)(81156014)(9686003)(2906002)(55016002)(53936002)(105586002)(8936002)(6116002)(305945005)(33656002)(6436002)(8676002)(106356001)(3846002)(99286003)(3660700001)(7736002)(6506006)(102836003)(3280700002)(2501003)(74316002)(2900100001)(81166006)(50986999)(110136005)(478600001)(7696004)(66066001)(54356999)(450100002)(86362001)(316002)(68736007)(230783001)(189998001)(97736004); 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: 02 Oct 2017 17:34:06.1739 (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-02_05:, , 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-1710020252
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/iPG6uhdUOt4_R_9zQkywtUy8cpo>
Subject: [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: Mon, 02 Oct 2017 17:34:12 -0000

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. 

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. 

Feedback is very much appreciated.

Thanks folks,
Rodney Cummings
Co-author draft-ietf-tictoc-1588v2-yang-05