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

Tanguy Ropitault <tanguy.ropitault@gmail.com> Fri, 30 March 2018 00:16 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 38561127869 for <core@ietfa.amsl.com>; Thu, 29 Mar 2018 17:16:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.698
X-Spam-Level:
X-Spam-Status: No, score=-2.698 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_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=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 Apx7ZouJfZ0r for <core@ietfa.amsl.com>; Thu, 29 Mar 2018 17:16:34 -0700 (PDT)
Received: from mail-vk0-x22f.google.com (mail-vk0-x22f.google.com [IPv6:2607:f8b0:400c:c05::22f]) (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 B8AB2127775 for <core@ietf.org>; Thu, 29 Mar 2018 17:16:33 -0700 (PDT)
Received: by mail-vk0-x22f.google.com with SMTP id v205so2840781vkv.13 for <core@ietf.org>; Thu, 29 Mar 2018 17:16:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=MQmBhNEQbG4ZUgAYC8YA75yJyoScr2nhUM5JxaoEIaE=; b=R3ri+f6waRl/A0x5YVkNlKj4ycW5z1PZhjeBFakJ/yOcomIboe1w5MK44no/W7tBj7 KuEB5Iep9TIVwVj6CFQNUubNpWSSaXMZQEcIlpiPFLO9QZLpmQBPy+mWN60T0j5l5EKP vW1iy0/cXJaNO5K6HYQph/k0hnpA8j69msamdYDrJru8LqMRC0I1QKMAgIiXic8ZMcol qQnbfpK3F5YCM0hGQZv0tz1pfN8Wnna2tqEwKCJfBQ0qXW37NaeTTpnrkAStpXmtrKeE aGi2rTwj+QCEFMfs/KyKdQ0BUIp22JQM6/TDEooXCknWmCN9XcK00d+9zzyyCmSonjKz mzOg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=MQmBhNEQbG4ZUgAYC8YA75yJyoScr2nhUM5JxaoEIaE=; b=B+DBECZa4rRR5t0VUXeNAqlS1/uoShKm2EJb4lxNCgqhHbcJWzeeid4Kkh/XoBdiny XiR0jZ7AfwexHfYU9L363T8Ss6nSGzeapK3XTCm1748grGZlLxaiNWk48jlF1sWnabS5 yh44aOuQJJyauGGrqRflqZSpWopaKEBj+puCugR88FLSO+M831qCNK5cpKZ3uevpRb5X hmVahrabw4tIzelDtUCUT8ClJCZCAG1bYLUaSU4uIZMc83hiJM1Kq/Apac9HGfzUvYxU eQ3WEHZKcHlKLpG6xqj1LO0vArN1iHzkRD51NxvaiDTSgepK5XqDAM3NX9MvzJFQkXjU pFvA==
X-Gm-Message-State: ALQs6tDscjidZ+JBrkGfsIb2/73H4jhrEHASkkMAz4ErfRt7CKTxnnJ3 BbEWDDQp3dEJRRo9+BI4xdPHbLJ17Hh6mJilV5fjQfGT
X-Google-Smtp-Source: AIpwx48EIpCz4//486gQGFt6mJRhUQ8vx1k9kf1XUXfjgD8NAhYRLzqp8xDlQ/ZDKeOFLKQcGJwT2LhjliOEZJZTmss=
X-Received: by 10.31.234.193 with SMTP id i184mr6668035vkh.151.1522368992300; Thu, 29 Mar 2018 17:16:32 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.103.72.213 with HTTP; Thu, 29 Mar 2018 17:16:31 -0700 (PDT)
From: Tanguy Ropitault <tanguy.ropitault@gmail.com>
Date: Thu, 29 Mar 2018 20:16:31 -0400
Message-ID: <CAEgn=HKQorxw_OJrA1_ditia8FohbKnOna8u=EQ90Oap3+0L7Q@mail.gmail.com>
To: core@ietf.org
Content-Type: multipart/alternative; boundary="94eb2c0952a200d4880568962745"
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/Hos-cGJzwLF1lsL729yPlZ7j2p4>
Subject: [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 00:16:36 -0000

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)