Re: [netmod] for a future rfc6991bis

"Acee Lindem (acee)" <acee@cisco.com> Tue, 13 November 2018 16:03 UTC

Return-Path: <acee@cisco.com>
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 D07AF1294D7 for <netmod@ietfa.amsl.com>; Tue, 13 Nov 2018 08:03:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.971
X-Spam-Level:
X-Spam-Status: No, score=-14.971 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.47, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.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 E6vD-AJxSZFc for <netmod@ietfa.amsl.com>; Tue, 13 Nov 2018 08:03:26 -0800 (PST)
Received: from alln-iport-1.cisco.com (alln-iport-1.cisco.com [173.37.142.88]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DAF4E128CF2 for <netmod@ietf.org>; Tue, 13 Nov 2018 08:03:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2120; q=dns/txt; s=iport; t=1542125005; x=1543334605; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=n+v3pmdDmjF+wcLQuwpOcXsAvsPpRQvf19OAGvfB4X8=; b=BKybca7GbpELfasBSJGYl2ZxtH588bsRwz7pP08bl1PmxvcTWtZONQU+ 8QRuNXH3Ra1Vo8qKRriIVH86pK2Fy97hLXYUdH1FTPQ6+DdYZoEKoOols 56GLEx2jsFi1xFVEQnwDhCfXhc9NNVnB62eBKp7d7HecjHPEHRaHR3xE2 I=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0ADAABB9Opb/49dJa1hAxkBAQEBAQEBAQEBAQEHAQEBAQEBgVEEAQEBAQELAYIDZoECJwqDbogYi32CDZc1gXoLAQEYC4QDRgIXgyUiNA0NAQMBAQIBAQJtHAyFOwEBBAEBIRE6Cw4CAgEIDgIIAgImAgICGQwLFRACBAENBYMhAYIBD6gFgS+KIAUFgQaKdxeBf4ERJx+CTIMbAQGBYRcKJoI9MYImAp9WCQKRIBiQc5dWAhEUgSYdOIFVcBU7KgGCQYY7hGGFPkExjQKBHwEB
X-IronPort-AV: E=Sophos;i="5.54,499,1534809600"; d="scan'208";a="201221959"
Received: from rcdn-core-7.cisco.com ([173.37.93.143]) by alln-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2018 16:03:24 +0000
Received: from XCH-RTP-015.cisco.com (xch-rtp-015.cisco.com [64.101.220.155]) by rcdn-core-7.cisco.com (8.15.2/8.15.2) with ESMTPS id wADG3OUf022685 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 13 Nov 2018 16:03:24 GMT
Received: from xch-rtp-015.cisco.com (64.101.220.155) by XCH-RTP-015.cisco.com (64.101.220.155) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 13 Nov 2018 11:03:23 -0500
Received: from xch-rtp-015.cisco.com ([64.101.220.155]) by XCH-RTP-015.cisco.com ([64.101.220.155]) with mapi id 15.00.1395.000; Tue, 13 Nov 2018 11:03:23 -0500
From: "Acee Lindem (acee)" <acee@cisco.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Balázs Lengyel <balazs.lengyel@ericsson.com>
CC: NETMOD WG <netmod@ietf.org>
Thread-Topic: [netmod] for a future rfc6991bis
Thread-Index: AdR1b1B75pZToCjlLEK5aT+9YAPiFwAB1JzUACOi7oAAJMyqAAABim+AATgw44AAATEtgP//zKeA
Date: Tue, 13 Nov 2018 16:03:23 +0000
Message-ID: <091DC7F4-0C17-4E64-85B8-8963EFBC208B@cisco.com>
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> <20181113140709.vwc4f3mqmmgjaluu@anna.jacobs.jacobs-university.de>
In-Reply-To: <20181113140709.vwc4f3mqmmgjaluu@anna.jacobs.jacobs-university.de>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.116.152.196]
Content-Type: text/plain; charset="utf-8"
Content-ID: <8BCF686AD1FE44428A457C32E80B512B@emea.cisco.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-Outbound-SMTP-Client: 64.101.220.155, xch-rtp-015.cisco.com
X-Outbound-Node: rcdn-core-7.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/OogrrC339GkVMaVmZNWssoLfRsM>
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 16:03:28 -0000


On 11/13/18, 9:07 AM, "netmod on behalf of Juergen Schoenwaelder" <netmod-bounces@ietf.org on behalf of j.schoenwaelder@jacobs-university.de> wrote:

    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.

Or simply define a type with a base type of unit8 type and a range of 0-100. 

Acee 




    
    /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/>
    
    _______________________________________________
    netmod mailing list
    netmod@ietf.org
    https://www.ietf.org/mailman/listinfo/netmod