---
 ryu/ofproto/ofproto_v1_3.py        | 10 +++++-----
 ryu/ofproto/ofproto_v1_3_parser.py | 19 +++++++++++--------
 2 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/ryu/ofproto/ofproto_v1_3.py b/ryu/ofproto/ofproto_v1_3.py
index 1ff6428..f3c9d5e 100644
--- a/ryu/ofproto/ofproto_v1_3.py
+++ b/ryu/ofproto/ofproto_v1_3.py
@@ -526,11 +526,11 @@ DESC_STR_LEN_STR = str(DESC_STR_LEN)
 SERIAL_NUM_LEN = 32
 SERIAL_NUM_LEN_STR = str(SERIAL_NUM_LEN)
 OFP_DESC_PACK_STR = '!' + \
-                    DESC_STR_LEN_STR + 'c' + \
-                    DESC_STR_LEN_STR + 'c' + \
-                    DESC_STR_LEN_STR + 'c' + \
-                    SERIAL_NUM_LEN_STR + 'c' + \
-                    DESC_STR_LEN_STR + 'c'
+                    DESC_STR_LEN_STR + 's' + \
+                    DESC_STR_LEN_STR + 's' + \
+                    DESC_STR_LEN_STR + 's' + \
+                    SERIAL_NUM_LEN_STR + 's' + \
+                    DESC_STR_LEN_STR + 's'
 OFP_DESC_SIZE = 1056
 assert calcsize(OFP_DESC_PACK_STR) == OFP_DESC_SIZE

diff --git a/ryu/ofproto/ofproto_v1_3_parser.py
b/ryu/ofproto/ofproto_v1_3_parser.py
index f6f4969..bc13cd7 100644
--- a/ryu/ofproto/ofproto_v1_3_parser.py
+++ b/ryu/ofproto/ofproto_v1_3_parser.py
@@ -1378,7 +1378,7 @@ class OFPFlowRemoved(MsgBase):
         offset = (ofproto_v1_3.OFP_FLOW_REMOVED_SIZE -
                   ofproto_v1_3.OFP_MATCH_SIZE)

-        msg.match = OFPMatch(buf, offset)
+        msg.match = OFPMatch.parser(msg.buf, offset)

         return msg

@@ -1390,8 +1390,9 @@ class OFPPort(collections.namedtuple('OFPPort', (
     @classmethod
     def parser(cls, buf, offset):
         port = struct.unpack_from(ofproto_v1_3.OFP_PORT_PACK_STR, buf, offset)
-        return cls(*port)
-
+        ofpport = cls(*port)
+        ofpport.length = ofproto_v1_3.OFP_PORT_SIZE
+        return ofpport

 @_register_parser
 @_set_msg_type(ofproto_v1_3.OFPT_PORT_STATUS)
@@ -1823,8 +1824,9 @@ class OFPActionPopMpls(OFPAction):
 @OFPAction.register_action_type(ofproto_v1_3.OFPAT_SET_FIELD,
                                 ofproto_v1_3.OFP_ACTION_SET_FIELD_SIZE)
 class OFPActionSetField(OFPAction):
-    def __init__(self):
+    def __init__(self, field):
         super(OFPActionSetField, self).__init__()
+        self.field = field

     @classmethod
     def parser(cls, buf, offset):
@@ -1959,7 +1961,7 @@ class OFPMultipartRequest(MsgBase):
         self.type = self.__class__.cls_stats_type
         self.flags = flags

-    def _serialize_stats_body():
+    def _serialize_stats_body(self):
         pass

     def _serialize_body(self):
@@ -2158,13 +2160,14 @@ class
OFPAggregateStats(collections.namedtuple('OFPAggregateStats', (
 @_set_msg_type(ofproto_v1_3.OFPT_MULTIPART_REQUEST)
 class OFPAggregateStatsRequest(OFPFlowStatsRequestBase):
     def __init__(self, datapath, flags, table_id, out_port, out_group,
-                 cookie, cookie_mask):
+                 cookie, cookie_mask, match):
         super(OFPAggregateStatsRequest, self).__init__(datapath,
                                                        table_id,
                                                        out_port,
                                                        out_group,
                                                        cookie,
-                                                       cookie_mask)
+                                                       cookie_mask,
+                                                       match)


 @OFPMultipartReply.register_stats_type()
@@ -2763,7 +2766,7 @@ class OFPRoleRequest(MsgBase):
         self.role = role
         self.generation_id = generation_id

-    def __serialize_body(self):
+    def _serialize_body(self):
         assert self.role is not None
         assert self.generation_id is not None
         msg_pack_into(ofproto_v1_3.OFP_ROLE_REQUEST_PACK_STR,
--
1.7.12.4

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to