On Mon, 25 Feb 2013 13:54:53 +0000
张东亚 <[email protected]> wrote:

Thanks for finding.

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

Why the above is necessary?

The rest looks fine.

Can you send a patch per bug? For example, one patch for
DescStats bug, one patch for OFPFlowRemoved bug, so on.

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