On Mon, 18 Jun 2012 10:56:55 +0900 Simon Horman <[email protected]> wrote:
> On Mon, Jun 18, 2012 at 10:26:41AM +0900, FUJITA Tomonori wrote: > > Signed-off-by: FUJITA Tomonori <[email protected]> > > --- > > ryu/ofproto/ofproto_v1_2.py | 69 > > +++++++++++++++++++++++++++++++++++++++++++ > > 1 files changed, 69 insertions(+), 0 deletions(-) > > > > diff --git a/ryu/ofproto/ofproto_v1_2.py b/ryu/ofproto/ofproto_v1_2.py > > index 7c9227c..b1ff9ef 100644 > > --- a/ryu/ofproto/ofproto_v1_2.py > > +++ b/ryu/ofproto/ofproto_v1_2.py > > @@ -771,6 +771,75 @@ OFP_EXPERIMENTER_HEADER_SIZE = 16 > > assert (calcsize(OFP_EXPERIMENTER_HEADER_PACK_STR) + OFP_HEADER_SIZE == > > OFP_EXPERIMENTER_HEADER_SIZE) > > > > + > > +# OXM > > + > > + > > +def oxm_tlv_header__(class_, field, hasmask, length): > > + return (class_ << 16) | (field << 9) | (hasmask << 8) | length > > + > > + > > +def oxm_tlv_header(field, bits): > > + length = (bits + 7) / 8 > > I'm not sure that this always gives the correct result. > > For example, OXM_OF_IPV6_FLABEL, has 20 bits, which the above > will calculate as 3 bytes. The OVS implementation uses 4 bytes. > The latter seems to be correct to me. Hmm, the table 9 in the of spec says OXM_OF_IPV6_FLABEL uses 20 bits. oxm_length is in byte so I expected switches uses use the minimum bytes (3) for OXM_OF_IPV6_FLABEL. I miss something in the of spec? ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
