Re: [core] progressing ietf-core-yang-cbor and ietf-core-sid

"Rob Wilton (rwilton)" <rwilton@cisco.com> Wed, 15 January 2020 16:40 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 A7AA012087B for <core@ietfa.amsl.com>; Wed, 15 Jan 2020 08:40:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.49
X-Spam-Level:
X-Spam-Status: No, score=-14.49 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01, 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 header.b=EpSdFhHq; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=Xm+RpM4g
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 7WSaLU4mP5vr for <core@ietfa.amsl.com>; Wed, 15 Jan 2020 08:40:52 -0800 (PST)
Received: from alln-iport-5.cisco.com (alln-iport-5.cisco.com [173.37.142.92]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 27FE212085B for <core@ietf.org>; Wed, 15 Jan 2020 08:40:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=19316; q=dns/txt; s=iport; t=1579106452; x=1580316052; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=+1s0+dV+S3CXOX6iQf8IWh7I44g2tBHvEUI4YGoCxME=; b=EpSdFhHqCXhFpaw0bzKzEvpaLpkVMrErui2nhb4NkrY15BPHqXK1A2Lx qlAUngrxek9drN2tspIdc8yACCJjVuEUA6jK4V6Cni1BpAEU06mBshEwY mp7of3fIRXxgOZB4tinv1wgeKL0tFkLs5ClNBf5cVytIN8/xRU7soil0p g=;
IronPort-PHdr: 9a23:+DBi6xeIjFPxy/BoIsb2fpHwlGMj4e+mNxMJ6pchl7NFe7ii+JKnJkHE+PFxlwGRD57D5adCjOzb++D7VGoM7IzJkUhKcYcEFnpnwd4TgxRmBceEDUPhK/u/dTM7GNhFUndu/mqwNg5eH8OtL1A=
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0BECAAePx9e/49dJa1kHQEBAQkBEQUFAYF7gSUvUAVsWCAECyoKhAWDRgOKdIJfkyyEYoJSA1QJAQEBDAEBGAEKCgIBAYRAAheBaCQ4EwIDDQEBBAEBAQIBBQRthTcMhV4BAQEBAgEBARARChMBASwLAQQHBAIBBgIOAwEDAQEoAwICAiULFAMGCAIEDgUIGoMFgX1NAw4gAQIMilyQZAKBOIhhdYEygn8BAQWFGRiCDQMGgTaMGBqBQT+BEUeCTD6CZAEBAYFkK4JjMoIsjVeCeYVZmR8KgjiHPY8Omm6XOZIjAgQCBAUCDgEBBYFpIoFYcBU7gmwfMRgNiAEMF4NQgmSCMIU/dIEpiycBgQ8BAQ
X-IronPort-AV: E=Sophos;i="5.70,323,1574121600"; d="scan'208,217";a="413093650"
Received: from rcdn-core-7.cisco.com ([173.37.93.143]) by alln-iport-5.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 15 Jan 2020 16:40:51 +0000
Received: from XCH-ALN-006.cisco.com (xch-aln-006.cisco.com [173.36.7.16]) by rcdn-core-7.cisco.com (8.15.2/8.15.2) with ESMTPS id 00FGepV5023078 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 15 Jan 2020 16:40:51 GMT
Received: from xhs-rtp-002.cisco.com (64.101.210.229) by XCH-ALN-006.cisco.com (173.36.7.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 15 Jan 2020 10:40:50 -0600
Received: from xhs-rtp-003.cisco.com (64.101.210.230) by xhs-rtp-002.cisco.com (64.101.210.229) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 15 Jan 2020 11:40:47 -0500
Received: from NAM10-BN7-obe.outbound.protection.outlook.com (64.101.32.56) by xhs-rtp-003.cisco.com (64.101.210.230) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 15 Jan 2020 11:40:47 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i0ZEeBqtYXHxQCMJNOBYu/gpZ5o4OYfsmxiQs5b2qYvSW5wTkZ0tyM+6O78aAwcKoWAZh++GvGsgmszdf7Zu3VU21n4R4PYkgBGmxt+dkdnpYVEhxDcyOiaSESpbwHQOBYWnOhRLaNgcu1dQY/v/AfU6fGf0+i5l9OUHxs6be1rZsvQyMOMpOUgt5IKz+o01sUKoy6ti6sWNnDSMxEDiP2B/NTmRsAwJa8IfdaubcuHgHpPRQrjzc+Y6xJm9QlWqgGmTMEamerxtjqkmysfLt0Y+n048T1mUmyQxZ0ZWa9H07KfserKeNR6bSurhEbhjU9k4Fg7Ir3ZmqydLms5d5Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+1s0+dV+S3CXOX6iQf8IWh7I44g2tBHvEUI4YGoCxME=; b=cJjB5gdqSGKDLtRVLy+M6Ouze6poHL17TkOlAgX/2xGUbqExs8fgdE+J7v9DqPDlfkjZFiB8MzR6qpqZbd3qlq7clf4cuhaDCSlidbG7nUxIHZZA/cPu6aZK4bzaNx16HMAUW4k5kZr1TI8H25GDIDzGKkfywaXAohLtHTr+Jxk22tYi+zOidETnksv8hVTXg4oZlRUQ7TsVkWWXt3G5NI37HpGe2ZXx5f5lPW/e9cypaGnnTIWPO53/A8t//xncmg+LYdNy9VQs46G7/pnLWopdcwTvIOqMtzGc6A5Zx4jv7Um8ITx2WHgH15e0bDyqglHTQbJpBmSqYMHkpP9BcQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+1s0+dV+S3CXOX6iQf8IWh7I44g2tBHvEUI4YGoCxME=; b=Xm+RpM4gI7x14j/W5+k08/YUgcVDpSqPB+j77GPFgPYJ9kO8Q6GmwyRAKeSTsy78b9V/seujMjcTswJrUlLP9itkdAxmInkyRCh0V6q2RyeZ4ZjqM0OLB8IJcFobnjvENKnHCAQPw5VoYrRlj80AzAAFML6EOCqz6yZuM6JFqlg=
Received: from MN2PR11MB4366.namprd11.prod.outlook.com (52.135.38.209) by MN2PR11MB4416.namprd11.prod.outlook.com (52.135.36.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.19; Wed, 15 Jan 2020 16:40:46 +0000
Received: from MN2PR11MB4366.namprd11.prod.outlook.com ([fe80::b9ce:1058:5fa6:44a1]) by MN2PR11MB4366.namprd11.prod.outlook.com ([fe80::b9ce:1058:5fa6:44a1%7]) with mapi id 15.20.2623.018; Wed, 15 Jan 2020 16:40:46 +0000
From: "Rob Wilton (rwilton)" <rwilton@cisco.com>
To: Carsten Bormann <cabo@tzi.org>
CC: Michael Richardson <mcr+ietf@sandelman.ca>, "core@ietf.org" <core@ietf.org>
Thread-Topic: [core] progressing ietf-core-yang-cbor and ietf-core-sid
Thread-Index: AQHVurUJXZhJjcMJe0u46wy442FB/KfheU0AgAHZe4CAAM9xgIACJ0WAgAI7cgCAAH+BgIAC1zwAgAASRXCAABKKAIAAANaQ
Date: Wed, 15 Jan 2020 16:40:46 +0000
Message-ID: <MN2PR11MB43663281BBACA171BEBFAB2BB5370@MN2PR11MB4366.namprd11.prod.outlook.com>
References: <29380.1565102380@localhost> <BL0PR06MB50428065032ECC2AB3345F619AD70@BL0PR06MB5042.namprd06.prod.outlook.com> <7505.1565633977@localhost> <BL0PR06MB50424C618A704460E4A8F8D99AA90@BL0PR06MB5042.namprd06.prod.outlook.com> <18990.1577231446@localhost> <CAJFkdRyWOfCb4U09rEJ-ZMR3GUuk-rmQ+f3Fs164Mxs8qkeVuw@mail.gmail.com> <22612.1578626081@localhost> <CAJFkdRztFUxdGcdvtTgB=9c-e_BwDAgLTmVPJ+OB8-dgs1sGog@mail.gmail.com> <15754.1578789013@localhost> <CAJFkdRy_3pC37ZxzhTmzqRgWjwDvEFTuhu5Z8+_ktaJgoeOGfg@mail.gmail.com> <6025.1578939111@localhost> <ACA7E58F-A308-457B-846F-E298807DCEC1@tzi.org> <MN2PR11MB4366A026E4A16F311E5922BFB5370@MN2PR11MB4366.namprd11.prod.outlook.com> <46BA6719-5319-40FC-B218-5832F32C85BC@tzi.org>
In-Reply-To: <46BA6719-5319-40FC-B218-5832F32C85BC@tzi.org>
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=rwilton@cisco.com;
x-originating-ip: [173.38.220.36]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 6b2469f0-5d77-4889-b94b-08d799d9abf3
x-ms-traffictypediagnostic: MN2PR11MB4416:
x-microsoft-antispam-prvs: <MN2PR11MB4416D21305DB349A7C7E1283B5370@MN2PR11MB4416.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:6430;
x-forefront-prvs: 02830F0362
x-forefront-antispam-report: SFV:NSPM; SFS:(10001)(10009020)(4636009)(366004)(39860400002)(346002)(376002)(136003)(396003)(199004)(189003)(81166006)(8676002)(966005)(54906003)(71200400001)(53546011)(2906002)(6506007)(86362001)(52536014)(6916009)(33656002)(66446008)(81156014)(478600001)(8936002)(5660300002)(55016002)(21615005)(316002)(26005)(7696005)(186003)(66946007)(64756008)(66476007)(76116006)(4326008)(66556008)(9686003); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR11MB4416; H:MN2PR11MB4366.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: FJ4S4oPYsW9yeiRQ36YMhw81+Gxso5LFVDIhUs5duwo2RI8L4S0InMdyNvvtW2yTElfWQaBi2Ejp5DGL4XOfPspjhZcNbRcrWvy5coV5PRooXn4nnWGTUZ6nejRcaqD3KcqgtYJ34Y9SRmfht9+C7JRahjA8p2aZMuIeY5/gA218a1LdcfFrORtOrV2y5XIpXpucHsPS5H5sCs7Bv0nsajiRd6aOIyiccRsIsQ4tb+CACSqlbUnlfA26gPRFqPwRmwD108Yn08pvFULSrTlIBFL1OSbI27kQOFL/tWNVJSmPsGLud7+VTgtH94aDFXOKYlJtwcK1wECD9XLNR9DHMd/iwgY9zLgR6ETEy5Y3epPh4MfhOS8L8QuzbdVraDZy5+uKmtQ/oBejzkFgI2IIdoaGeE/J4KPWni46ri4MyyGEr/CHYnLM0BwBTh7gBFDsCqaWZfmaEZ3QvN7wCzdET3ic1aST/L78VXr6n2Hf5mTaSE6SuH8vI1OMTi3qW7fGB6bYdacIoJ+gmvHJnfZ/wr2YmsBlP3dctbHabyG1zedmmWPS7RzgoVTQK+aeMjCiCXvlrw6dPh/O4kyc1xASJw==
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_MN2PR11MB43663281BBACA171BEBFAB2BB5370MN2PR11MB4366namp_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 6b2469f0-5d77-4889-b94b-08d799d9abf3
X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2020 16:40:46.2127 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: y9I1yLLXpwaUpDMmyLepCu8HhS2c31e4aDQHMoM4KsBBgxPRIP9JTA7DD/dy/TS/gfyJFM0O3GeBT/OlYNlrqQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4416
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.36.7.16, xch-aln-006.cisco.com
X-Outbound-Node: rcdn-core-7.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/OqoKUn-cmZLpcvtE5ugw5z5T2bU>
Subject: Re: [core] progressing ietf-core-yang-cbor and ietf-core-sid
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: Wed, 15 Jan 2020 16:40:57 -0000




> -----Original Message-----

> From: Carsten Bormann <cabo@tzi.org>

> Sent: 15 January 2020 15:46

> To: Rob Wilton (rwilton) <rwilton@cisco.com>

> Cc: Michael Richardson <mcr+ietf@sandelman.ca>; core@ietf.org

> Subject: Re: [core] progressing ietf-core-yang-cbor and ietf-core-sid

>

> Yeah, but here the problem is in the head of the implementor and not in

> the CPU architecture :-)



I'm not sure that I agree, 😉



I might be wrong, but most CPU architectures don't support 64 bit negative values (unless you move to 128 bit signed numbers with the corresponding performance overhead).  Of course, implementors can work around the architecture limitations by emulating 64 bit negative numbers using unsigned 64 bit numbers ...





In fact, I was wondering whether it is really a good thing that CBOR allows a 64 bit negative integer to be expressed.  It means that the CBOR encoding can easily carry values that most implementations cannot easily generate or represent.



So, I looked at the first available C implementation example at https://cbor.io/impls.html, and it can't handle negative 64 bit numbers, overflowing them into a long variable.  I wonder what proportion of CBOR implementations do handle these correctly ...  Of course, I'm not suggesting changing the spec, just a retrospective observation.



> I was not suggesting the text behind the

> substitutes to be included, this was just explanation why I’d like to have

> the change.

[RW]

Yes, but I think that "architectures" is probably the correct term here, at least until we end up with CPUs with a 65 bit signed datapath, although I have to confess that I doubt that the choice of word really matters. 😊



Thanks,
Rob







>

> Grüße, Carsten

>

>

> > On 2020-01-15, at 16:01, Rob Wilton (rwilton) <rwilton@cisco.com<mailto:rwilton@cisco.com>> wrote:

> >

> >

> >

> >> -----Original Message-----

> >> From: core <core-bounces@ietf.org<mailto:core-bounces@ietf.org>> On Behalf Of Carsten Bormann

> >> Sent: 15 January 2020 13:35

> >> To: Michael Richardson <mcr+ietf@sandelman.ca<mailto:mcr+ietf@sandelman.ca>>

> >> Cc: core@ietf.org<mailto:core@ietf.org>

> >> Subject: Re: [core] progressing ietf-core-yang-cbor and ietf-core-sid

> >>

> >> (No chair hat.)

> >>

> >> On 2020-01-13, at 19:11, Michael Richardson <mcr+ietf@sandelman.ca<mailto:mcr+ietf@sandelman.ca>>

> wrote:

> >>>

> >>> The use of 63-bit unsigned integers allows SIDs to be manipulated

> >>> more easily  on architectures that might otherwise lack native

> >>> 64-bit

> >> unsigned arithmetic.

> >>> The loss a single bit of precision is not significant given the size

> >>> of the  space.

> >>

> >> s/use of/limitation to/     (we have been using them before)

> >> s/architectures/platforms/  (Java is our main problem here, no?)

> > [RW]

> > I think that it would be awkward for most languages/CPU architectures,

> anywhere where you could end up with a negative number that is less than

> 2^63.

> >

> > Yes, it is possible to write code in C or Java to handle this, but my

> > hunch is that implementations could easily get this wrong (e.g. by

> > just using signed int64 as the type to hold the difference between

> > parent and child SIDs.)

> >

> > Thanks,

> > Rob

> >

> >

> >> s/precision/range/ s/space/remaining space/

> >>

> >> Grüße, Carsten

> >>

> >> _______________________________________________

> >> core mailing list

> >> core@ietf.org<mailto:core@ietf.org>

> >> https://www.ietf.org/mailman/listinfo/core