Reviewed-by: Isaku Yamahata <[email protected]>

On Tue, May 22, 2012 at 07:35:56AM +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 |   19 +++++++++++++++++++
>  2 files changed, 24 insertions(+), 0 deletions(-)
> 
> diff --git a/ryu/ofproto/ofproto_v1_0.py b/ryu/ofproto/ofproto_v1_0.py
> index 7ca552a..9209808 100644
> --- a/ryu/ofproto/ofproto_v1_0.py
> +++ b/ryu/ofproto/ofproto_v1_0.py
> @@ -235,6 +235,7 @@ OFP_ACTION_PACK_STR = '!H'
>  NXAST_RESUBMIT = 1
>  NXAST_SET_TUNNEL = 2
>  NXAST_SET_QUEUE = 4
> +NXAST_POP_QUEUE = 5
>  NXAST_REG_MOVE = 6
>  NXAST_REG_LOAD = 7
>  NXAST_SET_TUNNEL64 = 9
> @@ -257,6 +258,10 @@ 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_POP_QUEUE_PACK_STR = '!HHIH6x'
> +NX_ACTION_POP_QUEUE_SIZE = 16
> +assert calcsize(NX_ACTION_POP_QUEUE_PACK_STR) == NX_ACTION_POP_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 881342f..fafc9d0 100644
> --- a/ryu/ofproto/ofproto_v1_0_parser.py
> +++ b/ryu/ofproto/ofproto_v1_0_parser.py
> @@ -502,6 +502,25 @@ class NXActionSetQueue(NXActionHeader):
>          return cls(queue_id)
>  
>  
> [email protected]_nx_action_subtype(ofproto_v1_0.NXAST_POP_QUEUE)
> +class NXActionPopQueue(NXActionHeader):
> +    def __init__(self):
> +        super(NXActionPopQueue, self).__init__(
> +            ofproto_v1_0.NXAST_POP_QUEUE,
> +            ofproto_v1_0.NX_ACTION_POP_QUEUE_SIZE)
> +
> +    def serialize(self, buf, offset):
> +        msg_pack_into(ofproto_v1_0.NX_ACTION_POP_QUEUE_PACK_STR, buf,
> +                      offset, self.type, self.len, self.vendor,
> +                      self.subtype)
> +
> +    @classmethod
> +    def parser(cls, buf, offset):
> +        (type_, len_, vendor, subtype) = struct.unpack_from(
> +            ofproto_v1_0.NX_ACTION_POP_QUEUE_PACK_STR, buf, offset)
> +        return cls()
> +
> +
>  @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
> 

-- 
yamahata

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

Reply via email to