Re: [yang-doctors] Yangdoctors Early Review of draft-ietf-lpwan-schc-yang-data-model-04
Laurent Toutain <laurent.toutain@imt-atlantique.fr> Sun, 25 April 2021 17:49 UTC
Return-Path: <laurent.toutain@imt-atlantique.fr>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 647A93A0F49; Sun, 25 Apr 2021 10:49:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=imt-atlantique.fr
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 RayrsCsZIO1W; Sun, 25 Apr 2021 10:49:33 -0700 (PDT)
Received: from zproxy120.enst.fr (zproxy120.enst.fr [IPv6:2001:660:330f:2::c1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2ED173A0F4A; Sun, 25 Apr 2021 10:49:32 -0700 (PDT)
Received: from localhost (localhost [IPv6:::1]) by zproxy120.enst.fr (Postfix) with ESMTP id A8BE580AB4; Sun, 25 Apr 2021 19:49:28 +0200 (CEST)
Received: from zproxy120.enst.fr ([IPv6:::1]) by localhost (zproxy120.enst.fr [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id NuzWcqqY8dSZ; Sun, 25 Apr 2021 19:49:26 +0200 (CEST)
Received: from localhost (localhost [IPv6:::1]) by zproxy120.enst.fr (Postfix) with ESMTP id EAD4C80C03; Sun, 25 Apr 2021 19:49:25 +0200 (CEST)
DKIM-Filter: OpenDKIM Filter v2.10.3 zproxy120.enst.fr EAD4C80C03
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=imt-atlantique.fr; s=50EA75E8-DE22-11E6-A6DE-0662BA474D24; t=1619372966; bh=Fkdl0I2sWJiieVXjsNM5KndH7C5N3vFpsUjCNIjXbzA=; h=MIME-Version:From:Date:Message-ID:To; b=bG2/AgmBZkz5a985JpKhWAgjtedlWxkx8+M7NeTZQIv9prg9vM2/MhdMI3KXj5qv1 NOEvHQKtQ+7ljTa9tbiAqLX2GZjmHhEGwU9g4jD8BCVMNoD4sQ4f0SsuzsBbpUqcR3 OGQxNzpQhr1sZiItSjTG0m1Mb7pwCjKdvj/x6ZDo=
X-Virus-Scanned: amavisd-new at zproxy120.enst.fr
Received: from zproxy120.enst.fr ([IPv6:::1]) by localhost (zproxy120.enst.fr [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id okAcBzCc_MM2; Sun, 25 Apr 2021 19:49:25 +0200 (CEST)
Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by zproxy120.enst.fr (Postfix) with ESMTPSA id B014A80AB4; Sun, 25 Apr 2021 19:49:25 +0200 (CEST)
Received: by mail-pj1-f51.google.com with SMTP id e8-20020a17090a7288b029014e51f5a6baso3840318pjg.2; Sun, 25 Apr 2021 10:49:25 -0700 (PDT)
X-Gm-Message-State: AOAM530TnLf/gTKNDiORbnaEZ0NRQ337qEDTQwHZBGwcN4/OKYofmqcg qCBEL55RirpB9OWiXekHkL2mccOT8LKz6IAP11E=
X-Google-Smtp-Source: ABdhPJxYMjEClf6BW9/1ANefKysQ4IPRdKiG8V7hcrBPLiT2FnxrfTMdK2UdzpiqmcIU18mf6ZIsfoYsh1Z+zJWNL/U=
X-Received: by 2002:a17:902:714e:b029:eb:a5fa:3ad2 with SMTP id u14-20020a170902714eb02900eba5fa3ad2mr14640969plm.44.1619372964130; Sun, 25 Apr 2021 10:49:24 -0700 (PDT)
MIME-Version: 1.0
References: <005c01d73463$5ee2fda0$1ca8f8e0$@gmail.com> <CABONVQZhvp6=uTjkXZZSbPm5HYeNXjD3KSQuf-sPT5MFQWXkMA@mail.gmail.com> <ABE94981-CE4A-4198-A2BD-5BAB0D9C66E2@gmail.com>
In-Reply-To: <ABE94981-CE4A-4198-A2BD-5BAB0D9C66E2@gmail.com>
From: Laurent Toutain <laurent.toutain@imt-atlantique.fr>
Date: Sun, 25 Apr 2021 19:48:46 +0200
X-Gmail-Original-Message-ID: <CABONVQaXdkH8xnXuj-mV45n4LTr7-M+3C_cvHbmM7SeRKhJ39w@mail.gmail.com>
Message-ID: <CABONVQaXdkH8xnXuj-mV45n4LTr7-M+3C_cvHbmM7SeRKhJ39w@mail.gmail.com>
To: Carl Moberg <callemoberg@gmail.com>
Cc: Mehmet Ersue <mersue@gmail.com>, yang-doctors@ietf.org, lpwan@ietf.org, draft-ietf-lpwan-schc-yang-data-model.all@ietf.org
Content-Type: multipart/alternative; boundary="00000000000049354a05c0cfa6ab"
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/9jek_nPc_2qsGVke3n8n964lSrI>
Subject: Re: [yang-doctors] Yangdoctors Early Review of draft-ietf-lpwan-schc-yang-data-model-04
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 25 Apr 2021 17:49:38 -0000
Hi Carl, I've issued an updated version of the YANG model: https://github.com/lp-wan/datamodel/blob/master/ietf-schc%402021-04-23.yang The changes are the following: - pyang --ietf return no error - reformatted with pyang -f yang The field-id are now hierarchical, I created a new identity for each protocol, for instance for IPv6 fields: identity field-id-base-type { description "Field ID base type for all fields"; } identity field-id-ipv6-base-type { base field-id-base-type; description "Field IP base type for IPv6 headers described in RFC 8200"; } identity fid-ipv6-version { base field-id-ipv6-base-type; description "IPv6 version field from RFC8200"; } I also try to keep the hierarchy for sub-fields: identity fid-ipv6-trafficclass { base field-id-ipv6-base-type; description "IPv6 Traffic Class field from RFC8200"; } identity fid-ipv6-trafficclass-ds { base fid-ipv6-trafficclass; description "IPv6 Traffic Class field from RFC8200, DiffServ field from RFC3168"; } identity fid-ipv6-trafficclass-ecn { base fid-ipv6-trafficclass; description "IPv6 Traffic Class field from RFC8200, ECN field from RFC3168"; } For the correlation between fields, it is still a mystery, I tried this syntax, but it does not pass pyang validation: leaf field-length { type schc:field-length-type; mandatory true; when "derived-from(../field-id, 'fid-ipv6-version')" { default 4; } description "Field Length in bit or through a function defined as a YANG referenceid"; } I tried with another field, in the fragmentation part, when no-ack is used, window size does not have to be specified: leaf wsize { when "not(derived-from(../fragmentation-mode, 'fragmentation-mode-no-ack'))" ; type uint8; description "size in bit of the window field"; } there is no error, but I'm not sure it is correct. Many thanks for your help, Laurent On Thu, Apr 22, 2021 at 11:27 AM Carl Moberg <callemoberg@gmail.com> wrote: > Laurent, > > See inline below: > > > On 22 Apr 2021, at 10:45, Laurent Toutain < > laurent.toutain@imt-atlantique.fr> wrote: > > > > Dear Carl and Mehmet, > > > > Thank you very much for your review and all the advice, this will help > us to have a better document. I'm quite new in YANG and I was not aware of > the --ietf argument. It reports a lot of errors, I will correct them. -f > yang is also an option I was looking for to have more readable documents. > > > > Regarding the FID, you are right, it is too flat right now, we will > change it to have something more hierarchical that allows also to go inside > a field to allow subfields ids. > > > > For the last point, how do you establish a relation between fields in a > yang model? > > We could consider the use of “when”-statements (see: > https://tools.ietf.org/html/rfc7950#section-7.21.5) to constrain the type > of the length-field strictly based on the derived identity of the > field-identifier. > > Take a look and see what you can make out of it and if it applies in this > case. > > > Thank you again for your help > > > > Laurent > > > > On Sun, Apr 18, 2021 at 5:16 PM Mehmet Ersue <mersue@gmail.com> wrote: > > I’m sending this on behalf of Carl Moberg. > > > > It seems there was an issue and the review mail has not been generated. > > > > Text copied from > > > > > https://datatracker.ietf.org/doc/review-ietf-lpwan-schc-yang-data-model-04-yangdoctors-early-moberg-2021-04-13/ > > > > > > > > Mehmet > > > > > > > > Reviewer: Carl Moberg > > > > Review result: On the Right Track > > > > > > > > This is my YANG Doctors Early Review of > draft-ietf-lpwan-schc-yang-data-model-04 > > > > > > > > It is obviously challenging to provide early review feedback on how > useful and efficient the YANG model representation is for a set of > technologies that I am not an expert on, but here goes. > > > > > > > > Understanding that it is still early in the lifecycle of the module, I > have not spent time on providing feedback on e.g. description texts, > capitalization and spelling but have focused on the general structure and > design of the module. I also haven't spent any time dissecting the output > of `pyang --ietf`, but I would suggest the authors start looking into that > as the content of the module moves ahead towards publication. > > > > > > > > I would also suggest considering running the module through `pyang -f > yang` as that provides nice and consistent formatting and quoting. > > > > > > > > As for the content itself. I believe to the best of my understanding > that the YANG module reflects the core data structures of RFC8724 well. I > have a couple of questions that may lead to broader discussion on _how_ to > capture certain aspects of these data structures in a way that makes it > realistic to implement while still easy to use. > > > > > > > > As is right now, the YANG module assumes that all implementations > support all FID types defined to be derived from field-id-base-type. It > includes fields related IPv6, COAP/OSCORE, and ICMPv6 all in the same > module. Is there a possibility that some implementations won't implement > all three of those protocol groups? If so, it might be worth considering > making FID type groups either optional using YANG 'feature' statements or > break them out into separate modules to be advertised separately. > > > > > > > > There is currently no correlation between field-id type and field-length > types in the same compression rule entry. I.e. the current YANG permits a > field-identifier 'fid-ipv6-version' combined with a field-length > 'fl-token-length' in a rule entry, which I understand to be nonsensical. If > I am right in that it's an example of meaningless configuration, does the > authors think it important (and possible) to work towards a more stringent > validation of "meaningful" configuration by capturing the relationships > between fields like in this example? > > > > > > > > > > > > _______________________________________________ > > yang-doctors mailing list > > yang-doctors@ietf.org > > https://www.ietf.org/mailman/listinfo/yang-doctors > >
- [yang-doctors] Yangdoctors Early Review of draft-… Mehmet Ersue
- Re: [yang-doctors] Yangdoctors Early Review of dr… Laurent Toutain
- Re: [yang-doctors] Yangdoctors Early Review of dr… Laurent Toutain