Subject: [netmod] "uint24" in rfc6991-bis?

From: Robert Varga <[email-masked]>
Date: Wed, 22 Apr 2020 23:17:26 +0200

Hello,

a number of IETF protocols-and-whatnots are operating on unsigned 24bit
(or 3-octet) entities. For example:

https://tools.ietf.org/html/rfc7471#section-4.1.5
https://tools.ietf.org/html/rfc7471#section-4.4.5
SRGB range start/length in https://tools.ietf.org/html/rfc8669

I wonder whether it would make sense to provide something like:

type uint24 {
   type uint32;
   range 0..16777215;
}

in ietf-inet-types as a common base type for such definitions.

Regards,
Robert

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Thu, 23 Apr 2020 00:08:55 +0200

> SRGB range start/length in https://tools.ietf.org/html/rfc8669

For these use cases, it might be also a good idea to define types that
capture the additional semantics. SRGB seems to consist of two 24-bit
values - I can't tell whether it makes sense to model this 6-octet
value as two 3-octet values in YANG.

> in ietf-inet-types as a common base type for such definitions.

If we add such a definition, it likely should go into ietf-yang-types.

/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/>

---

From: "Rob Wilton (rwilton)" <[email-masked]>
Date: Thu, 23 Apr 2020 09:25:31 +0000

[As an individual contributor]

> -----Original Message-----
> From: netmod <[email-masked]> On Behalf Of Juergen Schoenwaelder
> Sent: 22 April 2020 23:09
> To: Robert Varga <[email-masked]>
> Cc: [email-masked]
> Subject: Re: [netmod] "uint24" in rfc6991-bis?
> 
> > a number of IETF protocols-and-whatnots are operating on unsigned
> > 24bit (or 3-octet) entities. For example:
> >
> values - I can't tell whether it makes sense to model this 6-octet value
> as two 3-octet values in YANG.
> 
[RW] 

I would find this type somewhat confusing in the sense that it mixing the underlying YANG datatype with the range of the value space,

e.g., I don't think of uint8 as
type uint8 {
   type uint32;
   range 0..255;
}

because the encoding is allowed to be different.  Perhaps having a slightly different name would help avoid possible confusion with the built in types?

Regards,
Rob

> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod

---

From: Martin Björklund <[email-masked]>
Date: Thu, 23 Apr 2020 11:57:15 +0200 (CEST)

"Rob Wilton \(rwilton\)" <rwilton=[email-masked]> wrote:
> I would find this type somewhat confusing in the sense that it mixing
> the underlying YANG datatype with the range of the value space,

I agree.

> because the encoding is allowed to be different.  Perhaps having a
> slightly different name would help avoid possible confusion with the
> built in types?

Then the question is if it really is so common so that we need a type
in ietf-yang-types for this.

/martin

---

From: tom petch <[email-masked]>
Date: Mon, 27 Apr 2020 11:07:56 +0000

From: netmod <[email-masked]> on behalf of Martin Björklund <[email-masked]>
Sent: 23 April 2020 10:57

I agree.

<tp>

I think not.  As Juergen said, where there is a 24 bit quantity, there are probably other semantics e.g. meaning of the maximum and minimum values comes to mind - and so a more specific type for that application seems a better idea.

Tom Petch
 
/martin