Re: [core] draft-ietf-core-sid-05 and draft-ietf-core-yang-cbor-07

Robert Wilton <rwilton@cisco.com> Fri, 15 March 2019 17:47 UTC

Return-Path: <rwilton@cisco.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7DCA512958B; Fri, 15 Mar 2019 10:47:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.501
X-Spam-Level:
X-Spam-Status: No, score=-14.501 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.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 LPk8qtgPEeyl; Fri, 15 Mar 2019 10:47:39 -0700 (PDT)
Received: from aer-iport-4.cisco.com (aer-iport-4.cisco.com [173.38.203.54]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CB7CB1277D7; Fri, 15 Mar 2019 10:47:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1426; q=dns/txt; s=iport; t=1552672058; x=1553881658; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=3lPx2Tw2JkEIxFjXbKx22BzIVTdgbmA3dJZP9lO/i00=; b=Jeich92I9yh2amNqQY2uRyo6/f4Fytru9C3XbWzndSKeUrZEcCd+qyd9 028jubZFr6YrAWGrpmGlCOFwWg2Haqt0b0rW26jL5Eh5Rtss2FhxmkgNP h7xzzANcpDFANL/q66Aa6ndRotchrKFgmU2PAaj189CivD/dROralBLHy 0=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AHAAAX5Itc/xbLJq1kGQEBAQEBAQEBAQEBAQcBAQEBAQGBUwIBAQEBAQsBgWCBF1AzJ4QLiHuMIi2YMYF7DR+ETQKEcjYHDQEBAwEBCQEDAm0cDIVKAQEBAwEjDwEFQQULCQIOCgICJgICVwYBDAYCAQGDHgGBbQgPj3KbZoEvhDABgRWEawWBCyQBi0mBQD+BOIJrgx4ChGuCVwOkSgmHW4tCBhmLDIhEiwWFdYVfh0mBTgMugVYzGggbFYMnghYXg0uFFIU/PwMwjnsBAQ
X-IronPort-AV: E=Sophos;i="5.58,482,1544486400"; d="scan'208";a="10709012"
Received: from aer-iport-nat.cisco.com (HELO aer-core-2.cisco.com) ([173.38.203.22]) by aer-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 15 Mar 2019 17:47:35 +0000
Received: from [10.63.23.135] (dhcp-ensft1-uk-vla370-10-63-23-135.cisco.com [10.63.23.135]) by aer-core-2.cisco.com (8.15.2/8.15.2) with ESMTP id x2FHlZKf019804; Fri, 15 Mar 2019 17:47:35 GMT
To: Carsten Bormann <cabo@tzi.org>, draft-ietf-core-sid@ietf.org
Cc: Michael Richardson <mcr+ietf@sandelman.ca>, "cbor@ietf.org" <cbor@ietf.org>, "core@ietf.org" <core@ietf.org>
References: <21467.1551662213@localhost> <92df97c1457947f09a2de92d740de925@XCH-RCD-007.cisco.com> <F90E782A-94C3-450A-8CD3-ADE9605174D7@tzi.org>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <7809a821-7ea8-f6ff-b5ff-ea8b124f9941@cisco.com>
Date: Fri, 15 Mar 2019 17:47:35 +0000
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3
MIME-Version: 1.0
In-Reply-To: <F90E782A-94C3-450A-8CD3-ADE9605174D7@tzi.org>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-Outbound-SMTP-Client: 10.63.23.135, dhcp-ensft1-uk-vla370-10-63-23-135.cisco.com
X-Outbound-Node: aer-core-2.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/EpDmDYzMM06WJds7_tsVWSXZe8s>
Subject: Re: [core] draft-ietf-core-sid-05 and draft-ietf-core-yang-cbor-07
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Mar 2019 17:47:43 -0000

On 15/03/2019 15:42, Carsten Bormann wrote:
> On Mar 15, 2019, at 14:24, Rob Wilton (rwilton) <rwilton@cisco.com> wrote:
>> In short, I think that it would be more pragmatic if SIDs are restricted to the non-negative range of the signed 64 bit integer type.  I.e. disallow values from (2^63 through 2^64 - 1).
> SIDs are unsigned integers.  However, there are still languages that have a hard time with those.

I imagine that you may be referring to languages like Java and Python, 
but in my experience, C and C++ also struggle to safely use unsigned 
numbers.

E.g. https://blog.regehr.org/archives/268 and their similar cases.


>    And it helps if all SID deltas fit into a signed 64-bit integer.

This is really the key one for me.

Otherwise, I would guess that many implementations will probably just 
assume that the delta always fits into a signed 64-bit integer and 
potentially fail silently in the future when they hit an 
overflow/underflow condition.


> So maybe limiting SIDs to the (non-negative) range of signed 64-bit integers is a restriction that makes sense.
>
> https://github.com/core-wg/yang-cbor has three pull requests, but no issues.
> (This apparently also happens to be the repo for the SID specification.)
>
> Should we put up the issues there?

I've added the author alias.  Hopefully we'll get an answer.

Thanks,
Rob


>
> Grüße, Carsten
>
> .
>