Hi. It's already fixed by change set of
95963e3cedeb9b7371770414037654e675f325ff
which is same to your proposal.
Please switch to Ryu 2.0 release or use the git repository.

thanks,

On Wed, Jun 05, 2013 at 03:25:45PM +0300, Oren Spector wrote:
> Hi,
> 
>  
> 
> Thanks for the fix. It works fine.
> 
>  
> 
> I encountered another problem related to OpenFlow 1.3. My application waits 
> for
> the PORT_STATUS event. When connecting to an OpenFlow 1.0 client it works 
> fine,
> but when connecting to an OpenFlow 1.3 client the following error occurs:
> 
>  
> 
> Traceback (most recent call last):
> 
>   File "/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py",
> line 97, in deactivate
> 
>     method(self)
> 
>   File "/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py",
> line 170, in _recv_loop
> 
>     version, msg_type, msg_len, xid, buf)
> 
>   File "/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_parser.py",
> line 50, in msg
> 
>     return msg_parser(datapath, version, msg_type, msg_len, xid, buf)
> 
>   File "/usr/local/lib/python2.7/dist-packages/ryu/ofproto/
> ofproto_v1_3_parser.py", line 50, in msg_parser
> 
>     return parser(datapath, version, msg_type, msg_len, xid, buf)
> 
>   File "/usr/local/lib/python2.7/dist-packages/ryu/ofproto/
> ofproto_v1_3_parser.py", line 1410, in parser
> 
>     ofproto_v1_3.OFP_HEADER_SIZE)
> 
> ValueError: too many values to unpack
> 
>  
> 
> I compared the parsing of PORT_STATUS event in both versions of the parser and
> it seems there is a bug in v1.3 parser. I fixed the code to resemble v1.0
> parser and it seems to work fine (and all the unit tests pass). I can send a
> patch if required. Here is the change I've made:
> 
>  
> 
> diff --git a/ryu/ofproto/ofproto_v1_3_parser.py b/ryu/ofproto/
> ofproto_v1_3_parser.py
> 
> index 53b002a..fff0004 100644
> 
> --- a/ryu/ofproto/ofproto_v1_3_parser.py
> 
> +++ b/ryu/ofproto/ofproto_v1_3_parser.py
> 
> @@ -1405,9 +1405,9 @@ class OFPPortStatus(MsgBase):
> 
>      def parser(cls, datapath, version, msg_type, msg_len, xid, buf):
> 
>          msg = super(OFPPortStatus, cls).parser(datapath, version, msg_type,
> 
>                                                 msg_len, xid, buf)
> 
> -        (msg.reason,) = struct.unpack_from(
> 
> +        msg.reason = struct.unpack_from(
> 
>              ofproto_v1_3.OFP_PORT_STATUS_PACK_STR, msg.buf,
> 
> -            ofproto_v1_3.OFP_HEADER_SIZE)
> 
> +            ofproto_v1_3.OFP_HEADER_SIZE)[0]
> 
>          msg.desc = OFPPort.parser(msg.buf,
> 
>                                    ofproto_v1_3.OFP_PORT_STATUS_DESC_OFFSET)
> 
>          return msg
> 
>  
> 
> Thanks,
> 
>   Oren
> 
>  
> 
> -----Original Message-----
> From: FUJITA Tomonori [mailto:[email protected]]
> Sent: Monday, June 03, 2013 6:43 PM
> To: [email protected]
> Cc: [email protected]
> Subject: Re: [Ryu-devel] Ryu OpenFlow 1.3 issue
> 
>  
> 
> Hi,
> 
>  
> 
> On Mon, 3 Jun 2013 16:16:29 +0300
> 
> "Oren Spector" <[email protected]> wrote:
> 
>  
> 
> > It seems switch_features_handler is not handling well an OpenFlow 1.3
> 
> > FEATURES_REPLY message, which doesn't contain port information (as
> 
> > opposed to OpenFlow 1.0 FEATURES_REPLY message). Any suggestions how
> 
> > to overcome this problem are welcomed.
> 
>  
> 
> We had the same discussion last week:
> 
>  
> 
> http://sourceforge.net/mailarchive/forum.php?thread_name=
> 20130601.223506.1568838937885774892.fujita.tomonori%40lab.ntt.co.jp&forum_name=
> ryu-devel
> 
>  
> 
> Here is a workaround for this:
> 
>  
> 
> https://github.com/fujita/ryu/commits/of13
> 
>  
> 
> ------------------------------------------------------------------------------
> 
> Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free
> troubleshooting tool designed for production Get down to code-level detail for
> bottlenecks, with <2% overhead.
> 
> Download for free and get started troubleshooting in minutes.
> 
> http://p.sf.net/sfu/appdyn_d2d_ap2
> 
> _______________________________________________
> 
> Ryu-devel mailing list
> 
> [email protected]
> 
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 

> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel


-- 
yamahata

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to