Re: [core] draft-ietf-core-comi-02: SID and Delta SID usage inconsistencies ?

Carsten Bormann <cabo@tzi.org> Fri, 30 March 2018 03:51 UTC

Return-Path: <cabo@tzi.org>
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 B9FBE129C56 for <core@ietfa.amsl.com>; Thu, 29 Mar 2018 20:51:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.863
X-Spam-Level:
X-Spam-Status: No, score=-0.863 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_SBL_CSS=3.335] autolearn=no autolearn_force=no
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 8jgpP7-THm6U for <core@ietfa.amsl.com>; Thu, 29 Mar 2018 20:51:52 -0700 (PDT)
Received: from mailhost.informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) (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 DA136124205 for <core@ietf.org>; Thu, 29 Mar 2018 20:51:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from submithost.informatik.uni-bremen.de (submithost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::b]) by mailhost.informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id w2U3plHP017148; Fri, 30 Mar 2018 05:51:47 +0200 (CEST)
Received: from [10.216.97.133] (unknown [210.161.158.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by submithost.informatik.uni-bremen.de (Postfix) with ESMTPSA id 40C7353Ch6zDXGX; Fri, 30 Mar 2018 05:51:45 +0200 (CEST)
Content-Type: multipart/alternative; boundary="Apple-Mail-0AAF4450-8946-4480-900E-0542DA6DD4ED"
Mime-Version: 1.0 (1.0)
From: Carsten Bormann <cabo@tzi.org>
X-Mailer: iPhone Mail (15D100)
In-Reply-To: <CAEgn=HKQorxw_OJrA1_ditia8FohbKnOna8u=EQ90Oap3+0L7Q@mail.gmail.com>
Date: Fri, 30 Mar 2018 12:51:40 +0900
Cc: core@ietf.org
Content-Transfer-Encoding: 7bit
Message-Id: <BFF715B5-BE8C-40AD-901C-14265675E1EB@tzi.org>
References: <CAEgn=HKQorxw_OJrA1_ditia8FohbKnOna8u=EQ90Oap3+0L7Q@mail.gmail.com>
To: Tanguy Ropitault <tanguy.ropitault@gmail.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/XjKWDtFjvurvlvjmnLekgt0SsPk>
Subject: Re: [core] draft-ietf-core-comi-02: SID and Delta SID usage inconsistencies ?
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.22
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, 30 Mar 2018 03:51:55 -0000

Hi Tanguy,

SIDs are unsigned, indeed. They are sometimes encoded as deltas. We need to stop calling those deltas SIDs. They aren't. If you find any place in the document where that is the case, please identify them. SID deltas are not confusing if they are not deliberately mixed up with SIDs. 

Sent from mobile

> On 30. Mar 2018, at 09:16, Tanguy Ropitault <tanguy.ropitault@gmail.com> wrote:
> 
> Hi,
> I'm wondering if there may be some inconsistencies between SID definition in draft-ietf-core-yang-cbor-05 and its usage in draft-ietf-core-comi-02. 
> The short version of the story is:
> - draft-ietf-core-yang-cbor-05 defines SID as an unsigned integer "YANG Schema Item iDentifier (SID): Unsigned integer used to identify different YANG items."
> - draft-ietf-core-comi-02 uses in some sections and examples SID with a negative value (or to be sharp, use delta SID where SID should be normally used)
> 
> Let's use an example for the long version of the story:
> 
> Section 2.3  of draft-ietf-core-comi-02 states that:
> "When part of a payload, instance identifiers are encoded in CBOR based on the rules defined in [I-D.ietf-core-yang-cbor] section 5.13.1"
> 
> Section 5.13.1 of draft-ietf-core-yang-cbor-05 states that:
> 
> "Single instance data nodes MUST be encoded using a CBOR unsigned integer data item (major type 0) and set to the targeted data node SID."
> 
> *** Please note that I'm using the single instance identifier case for a matter of clarity but the same applies for list instance identifier. 
> 
> So according to the sentences above, a single instance identifier that is a part of a payload can only be an unsigned int.
> 
> draft-ietf-core-comi-02 also states that FETCH request format must be:
> "The FETCH request payload contains a list of instance-identifier encoded based on the rules defined by Content-Format application/yang-selectors+cbor in Section 2.5"
> 
> application/yang-selectors+cbor is defined in Section 2.5 as:
> 
> "represents a CBOR YANG document containing a list of data node selectors (i.e. instance identifier)."
> 
> Moreover, Section 2.5 clearly recall this:
> "YANG instance identifier, encoded based on the rules defined in [I-D.ietf-core-yang-cbor] section 5.13.1."
> 
> So the FETCH request payload can only be made of instance identifier which are de-facto unsigned int (in the single instance identifier case) based on Section 2.3 and 5.13.1. However, due to the usage of delta SID for application/yang-selectors+cbor format, some instance identifier of a FETCH request can be negative (as shown in FETCH example in draft-ietf-core-comi-02). In fact, it seems that the sentence "When part of a payload, instance identifiers are encoded in CBOR based on the rules defined in [I-D.ietf-core-yang-cbor] section 5.13.1" is most of the time superseded by DeltaSID usage. 
> 
> So IMO, it's a little bit confusing and something may need to be added.
> 
> Tanguy Ropitault (Acklio)
> 
> _______________________________________________
> core mailing list
> core@ietf.org
> https://www.ietf.org/mailman/listinfo/core