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

Tanguy Ropitault <tanguy.ropitault@gmail.com> Fri, 30 March 2018 13:51 UTC

Return-Path: <tanguy.ropitault@gmail.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 EDF0912D7EF for <core@ietfa.amsl.com>; Fri, 30 Mar 2018 06:51:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 4BLz9D4GAhFq for <core@ietfa.amsl.com>; Fri, 30 Mar 2018 06:51:42 -0700 (PDT)
Received: from mail-ua0-x233.google.com (mail-ua0-x233.google.com [IPv6:2607:f8b0:400c:c08::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C6C74126DCA for <core@ietf.org>; Fri, 30 Mar 2018 06:51:41 -0700 (PDT)
Received: by mail-ua0-x233.google.com with SMTP id o34so5445486uae.9 for <core@ietf.org>; Fri, 30 Mar 2018 06:51:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=TjlBXupHVOv7WltbhPZ2aB9SwOcgbdzc9jvIJXz4+W4=; b=c9VzAcscnIwP0wAegGHdcVIBRiNKjN+IroeADQJhk49By3AeT/qDinyvcec7UFPv8J +ga9mGKCxYf3nyceY7ucSMODXV79YdTEwlC7zh6mx/KI9a3Gg80LjEVccSNijjJPFm6e TRX2My+Ek+7LfIgNLcWV7hse9nnEci3lKegU72pF0iIinX8PyobOQixe3uH5PS2X38Md uj0jQLNjC38kAgi48RHfDaQeXmUWBk3S1/IL9RNtEIwD00InYPs5zMu6kt8lRH32af+6 yeuZInFFpgVFsi5upreLkKbn8TPFFq/pSdSSpzJUMv/9gN1kU5fXJQiThaZV7AmVLcNo 5P9Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TjlBXupHVOv7WltbhPZ2aB9SwOcgbdzc9jvIJXz4+W4=; b=Z6gbRjE/236SAMdcFJX5RgO5iH0eLGm0V9tYi/4mhi9xpQ+R4XKmFBSGU1pPGVsG4r OC1DAusLBkHP9o9JGNsI6zo+bcDw2t5KZmpE5b9dTwphniGH5VRrVygefEnGCHbKzLkT Jn4tqeulqaQifkysbPL0kefs/iNSFHy/1OtNzs6A/HbXZU55Wak+SlFYsdWR22UNX4ZB Agrk+HISBcG7V/8x9BXYQJpiOAen/mbPFSJH9SmEJZOdZl/fxkJoL6YFCvZCvig6FZVW ForAUrLKCVT7w59/LnobK/mQZh9oalk84n7xd/ei5bzB6oqCOVup4rGh1MBUM1xMZrIH DSIw==
X-Gm-Message-State: AElRT7GO41pEA7qu6qPy5AcWIAySuHRyYvXqh3RskAJO9CURRhTQKitR AZTulyzUUkOWV4fBw45i6uVSRZMUnTCANWP9r0zLsQ==
X-Google-Smtp-Source: AIpwx4/ncLnA6ciSZrRcnBNBuIxTpg0DNwRXXbN6E9adgAlYU3KKGhOiOcjsHJ5cK9SCA5u78ocEQf585b+heVJ81X4=
X-Received: by 10.176.25.108 with SMTP id u44mr7654329uag.190.1522417900759; Fri, 30 Mar 2018 06:51:40 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.103.72.213 with HTTP; Fri, 30 Mar 2018 06:51:40 -0700 (PDT)
In-Reply-To: <BFF715B5-BE8C-40AD-901C-14265675E1EB@tzi.org>
References: <CAEgn=HKQorxw_OJrA1_ditia8FohbKnOna8u=EQ90Oap3+0L7Q@mail.gmail.com> <BFF715B5-BE8C-40AD-901C-14265675E1EB@tzi.org>
From: Tanguy Ropitault <tanguy.ropitault@gmail.com>
Date: Fri, 30 Mar 2018 09:51:40 -0400
Message-ID: <CAEgn=HLMbo5sZh_z6nBmbK-G8CvUm7WJ4LQDQrwezpWqrsg-Qw@mail.gmail.com>
To: Carsten Bormann <cabo@tzi.org>
Cc: core@ietf.org
Content-Type: multipart/alternative; boundary="f403043ecc202cae6f0568a18aa5"
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/BIweGl-WPhHE_S9IuOBAslTwqKk>
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 13:51:45 -0000

 Thanks Carsten!

I think that my message just shows how confused I am. You're totally right
that Delta SID term should never be used as Delta is the correct term (and
both drafts never use the term Delta SID).

However, let's see that from an implementer perspective as it may help to
clarify:

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."


So as an implementer, I'm expecting to declare an uint64 for instance
identifiers that are part of a payload. However, CoMI may need to use
signed int because of Delta (e.g. FETCH request). And that is what is
confusing IMO i.e., the "MUST" requirement is not always satisfied.

Tanguy


On Thu, Mar 29, 2018 at 11:51 PM, Carsten Bormann <cabo@tzi.org> wrote:

> 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
> <https://tools.ietf.org/html/draft-ietf-core-comi-02#ref-I-D.ietf-core-yang-cbor>]
> section 5.13.1
> <https://tools.ietf.org/html/draft-ietf-core-comi-02#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
>
>