Re: [netmod] for a future rfc6991bis

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Tue, 13 November 2018 14:07 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C8DF412F1A6 for <netmod@ietfa.amsl.com>; Tue, 13 Nov 2018 06:07:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham 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 fl7WsuKqolRF for <netmod@ietfa.amsl.com>; Tue, 13 Nov 2018 06:07:13 -0800 (PST)
Received: from atlas5.jacobs-university.de (atlas5.jacobs-university.de [212.201.44.20]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F1B2812D4EE for <netmod@ietf.org>; Tue, 13 Nov 2018 06:07:12 -0800 (PST)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas5.jacobs-university.de (Postfix) with ESMTP id 84439DC0; Tue, 13 Nov 2018 15:07:11 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas5.jacobs-university.de ([10.70.0.217]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10032) with ESMTP id 3UaYS2dzFYIm; Tue, 13 Nov 2018 15:07:11 +0100 (CET)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas5.jacobs-university.de (Postfix) with ESMTPS; Tue, 13 Nov 2018 15:07:11 +0100 (CET)
Received: from localhost (demetrius2.jacobs-university.de [212.201.44.47]) by hermes.jacobs-university.de (Postfix) with ESMTP id 6CF1C2003F; Tue, 13 Nov 2018 15:07:11 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius2.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id Uy1mD6jLFvUC; Tue, 13 Nov 2018 15:07:11 +0100 (CET)
Received: from exchange.jacobs-university.de (sxchmb04.jacobs.jacobs-university.de [10.70.0.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "exchange.jacobs-university.de", Issuer "DFN-Verein Global Issuing CA" (verified OK)) by hermes.jacobs-university.de (Postfix) with ESMTPS id E05192003C; Tue, 13 Nov 2018 15:07:10 +0100 (CET)
Received: from anna.localdomain (10.50.218.117) by sxchmb03.jacobs.jacobs-university.de (10.70.0.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1591.10; Tue, 13 Nov 2018 15:07:10 +0100
Received: by anna.localdomain (Postfix, from userid 501) id 3998530040FFA2; Tue, 13 Nov 2018 15:07:09 +0100 (CET)
Date: Tue, 13 Nov 2018 15:07:09 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Balázs Lengyel <balazs.lengyel@ericsson.com>
CC: "Yemin (Amy)" <amy.yemin@huawei.com>, Qin Wu <bill.wu@huawei.com>, Xufeng Liu <xufeng.liu.ietf@gmail.com>, NETMOD WG <netmod@ietf.org>
Message-ID: <20181113140709.vwc4f3mqmmgjaluu@anna.jacobs.jacobs-university.de>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: Balázs Lengyel <balazs.lengyel@ericsson.com>, "Yemin (Amy)" <amy.yemin@huawei.com>, Qin Wu <bill.wu@huawei.com>, Xufeng Liu <xufeng.liu.ietf@gmail.com>, NETMOD WG <netmod@ietf.org>
References: <B8F9A780D330094D99AF023C5877DABA9B0FC256@nkgeml513-mbs.china.huawei.com> <9C5FD3EFA72E1740A3D41BADDE0B461FCFA7803B@DGGEMM528-MBX.china.huawei.com> <20181106141613.zqy5xmq7qvahzzpz@anna.jacobs.jacobs-university.de> <9C5FD3EFA72E1740A3D41BADDE0B461FCFA78BFA@DGGEMM528-MBX.china.huawei.com> <20181107083401.7bqbjnewg3syd6dj@anna.jacobs.jacobs-university.de> <0bb4d572-3378-c46a-0802-c2c2fce7cc4e@ericsson.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
X-Clacks-Overhead: GNU Terry Pratchett
Content-Transfer-Encoding: 8bit
In-Reply-To: <0bb4d572-3378-c46a-0802-c2c2fce7cc4e@ericsson.com>
User-Agent: NeoMutt/20180716
X-ClientProxiedBy: SXCHMB03.jacobs.jacobs-university.de (10.70.0.155) To sxchmb03.jacobs.jacobs-university.de (10.70.0.155)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/jx0K8l5LLpULLe_PMDodSGK5qzY>
Subject: Re: [netmod] for a future rfc6991bis
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 13 Nov 2018 14:07:16 -0000

On Tue, Nov 13, 2018 at 01:33:01PM +0000, Balázs Lengyel wrote:
> Hello,
> 
> In some cases I want a percentage without fractions. This could be defined
> using range, by specifying the numbers 0 | 1 | 2 ... 99 | 100 in the range's
> argument.
> 
>     typedef percent-short {
>       type percent { range 0 | 1 | 2 ... 99 | 100; }  // didn't type out all the 101 integer values :-)
>     }
>

I guess we need to settle on a small number of percentage types that
people find useful and then module authors hopefully find what they
need. I am not sure that listing 101 numbers is a good pattern to use
(although it does achieve what you want). For percentages that have no
fraction, you likely want to derive from a base type that is efficient
to encode for binary encodings such as CBOR.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>