summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2014-02-20 13:08:52 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-02-26 23:53:22 +0900
commite0a0673d9c63332776af8a22ba5585d84b21ce2f (patch)
tree56590cf68802d4afd18aa4c50ec4b2b749ceded4
parentef8633753f73a01b692a5fe062badd3bad4e15bb (diff)
of14: Add queue desc request support
Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/ofproto/ofproto_v1_4_parser.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/ryu/ofproto/ofproto_v1_4_parser.py b/ryu/ofproto/ofproto_v1_4_parser.py
index 0c5d731e..fee980f1 100644
--- a/ryu/ofproto/ofproto_v1_4_parser.py
+++ b/ryu/ofproto/ofproto_v1_4_parser.py
@@ -2540,6 +2540,45 @@ class OFPTableDescStatsReply(OFPMultipartReply):
super(OFPTableDescStatsReply, self).__init__(datapath, **kwargs)
+@_set_stats_type(ofproto.OFPMP_QUEUE_DESC, OFPQueueDesc)
+@_set_msg_type(ofproto.OFPT_MULTIPART_REQUEST)
+class OFPQueueDescStatsRequest(OFPMultipartRequest):
+ """
+ Queue description request message
+
+ The controller uses this message to query description of all the queues.
+
+ ================ ======================================================
+ Attribute Description
+ ================ ======================================================
+ flags Zero or ``OFPMPF_REQ_MORE``
+ port_no Port number to read (OFPP_ANY for all ports)
+ queue_id ID of queue to read (OFPQ_ALL for all queues)
+ ================ ======================================================
+
+ Example::
+
+ def send_tablet_desc_stats_request(self, datapath):
+ ofp_parser = datapath.ofproto_parser
+
+ req = ofp_parser.OFPQueueDescStatsRequest(datapath, 0,
+ ofp.OFPP_ANY,
+ ofp.OFPQ_ALL)
+ datapath.send_msg(req)
+ """
+ def __init__(self, datapath, flags=0, port_no=ofproto.OFPP_ANY,
+ queue_id=ofproto.OFPQ_ALL, type_=None):
+ super(OFPQueueDescStatsRequest, self).__init__(datapath, flags)
+ self.port_no = port_no
+ self.queue_id = queue_id
+
+ def _serialize_stats_body(self):
+ msg_pack_into(ofproto.OFP_QUEUE_DESC_REQUEST_PACK_STR,
+ self.buf,
+ ofproto.OFP_MULTIPART_REQUEST_SIZE,
+ self.port_no, self.queue_id)
+
+
class OFPQueueProp(OFPPropBase):
_TYPES = {}