Signed-off-by: OHMURA Kei <[email protected]>
---
ryu/ofproto/ofproto_v1_0_parser.py | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/ryu/ofproto/ofproto_v1_0_parser.py
b/ryu/ofproto/ofproto_v1_0_parser.py
index f9673fb..7945888 100644
--- a/ryu/ofproto/ofproto_v1_0_parser.py
+++ b/ryu/ofproto/ofproto_v1_0_parser.py
@@ -2194,15 +2194,21 @@ class NXStatsRequest(OFPVendorStatsRequest):
class NXFlowStatsRequest(NXStatsRequest):
- def __init__(self, datapath, flags, out_port, match_len,
- table_id):
+ def __init__(self, datapath, flags, out_port, table_id, rule=None):
super(NXFlowStatsRequest, self).__init__(datapath, flags,
ofproto_v1_0.NXST_FLOW)
self.out_port = out_port
- self.match_len = match_len
self.table_id = table_id
+ self.rule = rule
+ self.match_len = 0
def _serialize_vendor_stats_body(self):
+ if self.rule is not None:
+ offset = ofproto_v1_0.NX_STATS_MSG_SIZE + \
+ ofproto_v1_0.NX_FLOW_STATS_REQUEST_SIZE
+ self.match_len = nx_match.serialize_nxm_match(
+ self.rule, self.buf, offset)
+
msg_pack_into(
ofproto_v1_0.NX_FLOW_STATS_REQUEST_PACK_STR,
self.buf, ofproto_v1_0.NX_STATS_MSG_SIZE, self.out_port,
--
1.7.9.5
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel