Reviewed-by: Simon Horman <[email protected]> On Tue, May 22, 2012 at 07:35:55AM +0900, FUJITA Tomonori wrote: > Signed-off-by: FUJITA Tomonori <[email protected]> > --- > ryu/ofproto/ofproto_v1_0.py | 5 +++++ > ryu/ofproto/ofproto_v1_0_parser.py | 20 ++++++++++++++++++++ > 2 files changed, 25 insertions(+), 0 deletions(-) > > diff --git a/ryu/ofproto/ofproto_v1_0.py b/ryu/ofproto/ofproto_v1_0.py > index 3492106..7ca552a 100644 > --- a/ryu/ofproto/ofproto_v1_0.py > +++ b/ryu/ofproto/ofproto_v1_0.py > @@ -234,6 +234,7 @@ OFP_ACTION_PACK_STR = '!H' > # enum nx_action_subtype (truncated) > NXAST_RESUBMIT = 1 > NXAST_SET_TUNNEL = 2 > +NXAST_SET_QUEUE = 4 > NXAST_REG_MOVE = 6 > NXAST_REG_LOAD = 7 > NXAST_SET_TUNNEL64 = 9 > @@ -252,6 +253,10 @@ NX_ACTION_SET_TUNNEL_PACK_STR = '!HHIH2xI' > NX_ACTION_SET_TUNNEL_SIZE = 16 > assert calcsize(NX_ACTION_SET_TUNNEL_PACK_STR) == NX_ACTION_SET_TUNNEL_SIZE > > +NX_ACTION_SET_QUEUE_PACK_STR = '!HHIH2xI' > +NX_ACTION_SET_QUEUE_SIZE = 16 > +assert calcsize(NX_ACTION_SET_QUEUE_PACK_STR) == NX_ACTION_SET_QUEUE_SIZE > + > NX_ACTION_REG_MOVE_PACK_STR = '!HHIHHHHII' > NX_ACTION_REG_MOVE_SIZE = 24 > assert calcsize(NX_ACTION_REG_MOVE_PACK_STR) == NX_ACTION_REG_MOVE_SIZE > diff --git a/ryu/ofproto/ofproto_v1_0_parser.py > b/ryu/ofproto/ofproto_v1_0_parser.py > index f016e82..881342f 100644 > --- a/ryu/ofproto/ofproto_v1_0_parser.py > +++ b/ryu/ofproto/ofproto_v1_0_parser.py > @@ -482,6 +482,26 @@ class NXActionSetTunnel(NXActionHeader): > return cls(tun_id) > > > [email protected]_nx_action_subtype(ofproto_v1_0.NXAST_SET_QUEUE) > +class NXActionSetQueue(NXActionHeader): > + def __init__(self, queue_id): > + super(NXActionSetQueue, self).__init__( > + ofproto_v1_0.NXAST_SET_QUEUE, > + ofproto_v1_0.NX_ACTION_SET_QUEUE_SIZE) > + self.queue_id = queue_id > + > + def serialize(self, buf, offset): > + msg_pack_into(ofproto_v1_0.NX_ACTION_SET_QUEUE_PACK_STR, buf, > + offset, self.type, self.len, self.vendor, > + self.subtype, self.queue_id) > + > + @classmethod > + def parser(cls, buf, offset): > + (type_, len_, vendor, subtype, queue_id) = struct.unpack_from( > + ofproto_v1_0.NX_ACTION_SET_QUEUE_PACK_STR, buf, offset) > + return cls(queue_id) > + > + > @NXActionHeader.register_nx_action_subtype(ofproto_v1_0.NXAST_REG_MOVE) > class NXActionRegMove(NXActionHeader): > def __init__(self, n_bits, src_ofs, dst_ofs, src, dst): > -- > 1.7.4.4 > > > ------------------------------------------------------------------------------ > 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 >
------------------------------------------------------------------------------ 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
