Re: [netmod] [core] CBOR YANG encoding of union & bits [draft-ietf-core-yang-cbor-12]

2020-06-04 Thread Ivaylo Petrov
Dear all, Thank you for spotting this issue and discussing a possible solution. I finally managed to dedicate enough time to try to properly understand it. If my understanding is correct, the problem we are discussing is that in some rare cases the proposed encoding of 'bits' might be really

Re: [netmod] [core] CBOR YANG encoding of union & bits [draft-ietf-core-yang-cbor-12]

2020-05-08 Thread Juergen Schoenwaelder
On Fri, May 08, 2020 at 10:48:06AM -0700, Jim Schaad wrote: > Does yang consider that there is a difference between a bit being > present and zero and a bit being absent? In YANG every bit in the bit set is either 0 or 1. The xml / json encodings send the position of the 1 bits (actually the

Re: [netmod] [core] CBOR YANG encoding of union & bits [draft-ietf-core-yang-cbor-12]

2020-05-08 Thread Andy Bierman
ue 1 in the corresponding position and octet. Andy *From:* core *On Behalf Of *Andy Bierman > *Sent:* Friday, May 8, 2020 8:58 AM > *To:* Carsten Bormann > *Cc:* c...@ietf.org; netmod@ietf.org > *Subject:* Re: [core] [netmod] CBOR YANG encoding of union & bits > [draft-ietf-core

Re: [netmod] [core] CBOR YANG encoding of union & bits [draft-ietf-core-yang-cbor-12]

2020-05-08 Thread Jim Schaad
& bits [draft-ietf-core-yang-cbor-12] On Fri, May 8, 2020 at 8:51 AM Andy Bierman mailto:a...@yumaworks.com> > wrote: On Thu, May 7, 2020 at 11:22 PM Carsten Bormann mailto:c...@tzi.org> > wrote: On 2020-05-08, at 05:27, Andy Bierman mailto:a...@yumaworks.com>

Re: [netmod] [core] CBOR YANG encoding of union & bits [draft-ietf-core-yang-cbor-12]

2020-05-08 Thread Andy Bierman
On Fri, May 8, 2020 at 8:51 AM Andy Bierman wrote: > > > On Thu, May 7, 2020 at 11:22 PM Carsten Bormann wrote: > >> On 2020-05-08, at 05:27, Andy Bierman wrote: >> > >> > Why is the bit position allowed to be a uint32 in YANG? Who knows, but >> it has to be supported. >> >> If we think that

Re: [netmod] [core] CBOR YANG encoding of union & bits [draft-ietf-core-yang-cbor-12]

2020-05-08 Thread Andy Bierman
On Thu, May 7, 2020 at 11:22 PM Carsten Bormann wrote: > On 2020-05-08, at 05:27, Andy Bierman wrote: > > > > Why is the bit position allowed to be a uint32 in YANG? Who knows, but > it has to be supported. > > If we think that is the way to go, I like Kio’s proposal over in the CBOR > list: >

Re: [netmod] [core] CBOR YANG encoding of union & bits [draft-ietf-core-yang-cbor-12]

2020-05-08 Thread Carsten Bormann
On 2020-05-08, at 05:27, Andy Bierman wrote: > > Why is the bit position allowed to be a uint32 in YANG? Who knows, but it has > to be supported. If we think that is the way to go, I like Kio’s proposal over in the CBOR list:

Re: [netmod] [core] CBOR YANG encoding of union & bits [draft-ietf-core-yang-cbor-12]

2020-05-07 Thread Andy Bierman
On Wed, May 6, 2020 at 10:22 AM Michael Richardson wrote: > > Carsten Bormann wrote: > >> Or, if it is supported by the language then is it reasonable that > >> implementation SHOULD support it? In which case I think that we > might > >> need a second encoding of bits that supports

Re: [netmod] [core] CBOR YANG encoding of union & bits [draft-ietf-core-yang-cbor-12]

2020-05-06 Thread Michael Richardson
Carsten Bormann wrote: >> Or, if it is supported by the language then is it reasonable that >> implementation SHOULD support it? In which case I think that we might >> need a second encoding of bits that supports this pathological case. >> Perhaps an array of 'set' bit