Re: [Roll] [roll] #8: DIO Option Length
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Roll] [roll] #8: DIO Option Length



Hi Tim,

Thanks for answering. I am not sure I get your point about padding.
Removing one byte does not necessarily mean that it will have to be
padded, e.g. if the option is padding 7 bytes with 2 bytes length, it
will not pad anything with one byte length. 

But I think you are correct that it may be a bit early to discuss all
this ;-)

Some suboptions should be moved to options (separate thread, DIO base
option is not optional hence should not be an option. Makes sense?).

General related question: for the cases where we need suboptions (metric
container), do we want suboptions to be 8 bytes aligned? Or only options
should be 8 bytes aligned?

Best,
Julien


> -----Original Message-----
> From: Tim Winter [mailto:wintert at acm.org] 
> Sent: lundi 2 novembre 2009 00:22
> To: Julien Abeille (jabeille)
> Cc: ROLL WG
> Subject: Re: [roll] #8: DIO Option Length
> 
> Hi Julien, WG,
> 
> Yes, the draft-ietf-roll-routing-metrics-03 suggests that the 
> metrics may exceed 255 bytes, and so the DIO suboption for 
> DAG Metric Container drives the overall requirements for 
> suboption length.
> 
> If we use 16bits for length, maybe 1 byte is `wasted' to 
> specify a short ( <
> 255 bytes) option.
> 
> If we use 8bits for length in units of 8bytes, only one byte 
> is used for suboption length in all cases, so the second byte 
> is saved.  But the suboption itself must pad for [0-7] bytes 
> to meet the 8 byte boundary.  In the first case, 0 byte of 
> padding is required, one byte is saved from encoding the 
> suboption length, and one byte is saved overall.  In the 
> second case, 1 byte of padding is used and one byte is saved 
> from the suboption length, breaking even.  In the 6 other 
> cases, more bytes are used for padding than are saved in 
> encoding the suboption length.
> 
> We don't know anything yet about a typical distribution of 
> lengths for suboptions, in particular the DAG Metric 
> Container.  So perhaps this discussion could be premature.  
> But, given that in the 8byte encoding case we use more bytes 
> in 6/8 of the possible cases, my opinion is that it is better 
> to stick with a 16-bit suboption length in units of bytes.
> 
> Thoughts?
> 
> Did you have another architectural driver in mind?
> 
> -Tim
> 
> Julien Abeille (jabeille) wrote:
> > Hi all,
> >  
> > do we expect DIO suboptions to be longer than 255 bytes? if 
> yes would 
> > it be ok to spell the length in multiple of  8bytes instead 
> of bytes 
> > (value of 1 means 8 bytes, like in ND). The target is to 
> use 8 bits instead of 16.
> >  
> > Thank you,
> > Julien
> > 
> > 
> > 
> ----------------------------------------------------------------------
> > --
> > 
> > _______________________________________________
> > Roll mailing list
> > Roll at ietf.org
> > https://www.ietf.org/mailman/listinfo/roll
> 
> 

Note: Messages sent to this list are the opinions of the senders and do not imply endorsement by the IETF.