body_cls_size assmes that a stats reply body has the fixed-size length. But it's not the case. So we can't use it and it's not used anymore so kill it.
Signed-off-by: FUJITA Tomonori <[email protected]> --- ryu/ofproto/ofproto_v1_0_parser.py | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ryu/ofproto/ofproto_v1_0_parser.py b/ryu/ofproto/ofproto_v1_0_parser.py index 322eca1..222d94b 100644 --- a/ryu/ofproto/ofproto_v1_0_parser.py +++ b/ryu/ofproto/ofproto_v1_0_parser.py @@ -1259,12 +1259,11 @@ class OFPStatsReply(MsgBase): _STATS_MSG_TYPES = {} @staticmethod - def register_stats_type(body_cls_size=0): + def register_stats_type(): def _register_stats_type(cls): assert cls.cls_stats_type is not None assert cls.cls_stats_type not in OFPStatsReply._STATS_MSG_TYPES assert cls.cls_stats_body_cls is not None - cls.cls_stats_body_cls_size = body_cls_size OFPStatsReply._STATS_MSG_TYPES[cls.cls_stats_type] = cls return cls return _register_stats_type @@ -1315,7 +1314,7 @@ class OFPDescStatsReply(OFPStatsReply): super(OFPDescStatsReply, self).__init__(datapath) [email protected]_stats_type(ofproto_v1_0.OFP_FLOW_STATS_SIZE) [email protected]_stats_type() @_set_stats_type(ofproto_v1_0.OFPST_FLOW, OFPFlowStats) @_set_msg_type(ofproto_v1_0.OFPT_STATS_REPLY) class OFPFlowStatsReply(OFPStatsReply): @@ -1323,7 +1322,7 @@ class OFPFlowStatsReply(OFPStatsReply): super(OFPFlowStatsReply, self).__init__(datapath) [email protected]_stats_type(ofproto_v1_0.OFP_AGGREGATE_STATS_REPLY_SIZE) [email protected]_stats_type() @_set_stats_type(ofproto_v1_0.OFPST_AGGREGATE, OFPAggregateStats) @_set_msg_type(ofproto_v1_0.OFPT_STATS_REPLY) class OFPAggregateStatsReply(OFPStatsReply): @@ -1331,7 +1330,7 @@ class OFPAggregateStatsReply(OFPStatsReply): super(OFPAggregateStatsReply, self).__init__(datapath) [email protected]_stats_type(ofproto_v1_0.OFP_TABLE_STATS_SIZE) [email protected]_stats_type() @_set_stats_type(ofproto_v1_0.OFPST_TABLE, OFPTableStats) @_set_msg_type(ofproto_v1_0.OFPT_STATS_REPLY) class OFPTableStatsReply(OFPStatsReply): @@ -1339,7 +1338,7 @@ class OFPTableStatsReply(OFPStatsReply): super(OFPTableStatsReply, self).__init__(datapath) [email protected]_stats_type(ofproto_v1_0.OFP_PORT_STATS_SIZE) [email protected]_stats_type() @_set_stats_type(ofproto_v1_0.OFPST_PORT, OFPPortStats) @_set_msg_type(ofproto_v1_0.OFPT_STATS_REPLY) class OFPPortStatsReply(OFPStatsReply): @@ -1347,7 +1346,7 @@ class OFPPortStatsReply(OFPStatsReply): super(OFPPortStatsReply, self).__init__(datapath) [email protected]_stats_type(ofproto_v1_0.OFP_QUEUE_STATS_SIZE) [email protected]_stats_type() @_set_stats_type(ofproto_v1_0.OFPST_QUEUE, OFPQueueStats) @_set_msg_type(ofproto_v1_0.OFPT_STATS_REPLY) class OFPQueueStatsReply(OFPStatsReply): -- 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
