Hi,

On 2015年07月29日 00:27, Ed Kiefer wrote:
> Folks:
> 
>  
> 
> Trying to run the RYU tester.py for OpenFlow 1.3 against an HP 5406zl switch.
> 
>  
> 
> Ryu-manager version: 3.23
> 
> HP software version:   K15.17.007
> 
>  
> 
> Got past the control-table number mismatch (HP == 100) ryu-manager test suite 
> expects 0, and then started to run the suite in earnest.
> 
>  
> 
> It appears that there is an error when the tester gets back from  the switch 
> an OFPT_MULTIPART_REPLY OFPMP_FLOW in response to an OFPT_MULTIPART_REQUEST,  
> OFPMP_FLOW asking for all tables, ports and groups.
> 
>  
> 
> Traceback:
> 
>         - (Ryu internal error.)
> 
> Traceback (most recent call last):
> 
>   File "/usr/local/lib/python2.7/dist-packages/ryu/tests/switch/tester.py", 
> line 465, in _test_execute
> 
>     self.target_sw.send_flow_stats, flow)
> 
>   File "/usr/local/lib/python2.7/dist-packages/ryu/tests/switch/tester.py", 
> line 601, in _test
> 
>     return test[state](*args)
> 
>   File "/usr/local/lib/python2.7/dist-packages/ryu/tests/switch/tester.py", 
> line 652, in _test_exist_check
> 
>     stats, message)
> 
>   File "/usr/local/lib/python2.7/dist-packages/ryu/tests/switch/tester.py", 
> line 919, in _compare_flow
> 
>     value1 = sorted(__reasm_match(value1))
> 
>   File "/usr/local/lib/python2.7/dist-packages/ryu/tests/switch/tester.py", 
> line 886, in __reasm_match
> 
>     for key, united_value in match.items():
> 
> AttributeError: 'OFPMatch' object has no attribute 'items'

I think it is a bug of OFPMatch class in ryu/ofproto/ofproto_v1_3_parser.py.

Could you try the following patch?
If it works, I will post this patch soon.

diff --git a/ryu/ofproto/ofproto_v1_3_parser.py 
b/ryu/ofproto/ofproto_v1_3_parser.py
index 85b8029..663344c 100644
--- a/ryu/ofproto/ofproto_v1_3_parser.py
+++ b/ryu/ofproto/ofproto_v1_3_parser.py
@@ -848,6 +848,9 @@ class OFPMatch(StringifyMixin):
     def iteritems(self):
         return iter(dict(self._fields2).items())
 
+    def items(self):
+        return self._fields2
+
     def get(self, key, default=None):
         return dict(self._fields2).get(key, default)

Thanks,
Iwase

> 
>  
> 
> Wireshark expanded packet dumps:
> 
>  
> 
> No.     Time           Source                Destination           Protocol 
> Length Info
>      51 11.016769000   192.168.1.10          192.168.1.4           OpenFlow 
> 122    Type: OFPT_MULTIPART_REQUEST, OFPMP_FLOW
> 
> Frame 51: 122 bytes on wire (976 bits), 122 bytes captured (976 bits) on 
> interface 0
> Ethernet II, Src: Dell_a5:de:4d (d4:ae:52:a5:de:4d), Dst: HewlettP_2c:c0:00 
> (f0:92:1c:2c:c0:00)
> Internet Protocol Version 4, Src: 192.168.1.10 (192.168.1.10), Dst: 
> 192.168.1.4 (192.168.1.4)
> Transmission Control Protocol, Src Port: 6653 (6653), Dst Port: 57407 
> (57407), Seq: 229, Ack: 293, Len: 56
> OpenFlow 1.3
>     Version: 1.3 (0x04)
>     Type: OFPT_MULTIPART_REQUEST (18)
>     Length: 56
>     Transaction ID: 262771846
>     Type: OFPMP_FLOW (1)
>     Flags: 0x0000
>     Pad: 00000000
>     Table ID: OFPTT_ALL (255)
>     Pad: 000000
>     Out port: OFPP_ANY (0xffffffff)
>     Out group: OFPG_ANY (0xffffffff)
>     Pad: 00000000
>     Cookie: 0x0000000000000000
>     Cookie mask: 0x0000000000000000
>     Match
>         Type: OFPMT_OXM (1)
>         Length: 4
>         Pad: 00000000
> 
> No.     Time           Source                Destination           Protocol 
> Length Info
>      52 11.017818000   192.168.1.4           192.168.1.10          OpenFlow 
> 282    Type: OFPT_MULTIPART_REPLY, OFPMP_FLOW
> 
> Frame 52: 282 bytes on wire (2256 bits), 282 bytes captured (2256 bits) on 
> interface 0
> Ethernet II, Src: HewlettP_2c:c0:00 (f0:92:1c:2c:c0:00), Dst: Dell_a5:de:4d 
> (d4:ae:52:a5:de:4d)
> Internet Protocol Version 4, Src: 192.168.1.4 (192.168.1.4), Dst: 
> 192.168.1.10 (192.168.1.10)
> Transmission Control Protocol, Src Port: 57407 (57407), Dst Port: 6653 
> (6653), Seq: 293, Ack: 285, Len: 216
> OpenFlow 1.3
>     Version: 1.3 (0x04)
>     Type: OFPT_MULTIPART_REPLY (19)
>     Length: 216
>     Transaction ID: 262771846
>     Type: OFPMP_FLOW (1)
>     Flags: 0x0000
>         .... .... .... ...0 = OFPMPF_REQ_MORE: 0x0000
>     Pad: 00000000
>     Flow stats
>         Length: 64
>         Table ID: 0
>         Pad: 00
>         Duration sec: 0
>         Duration nsec: 242000000
>         Priority: 0
>         Idle timeout: 0
>         Hard timeout: 0
>         Flags: 0x0000
>             .... .... .... ...0 = Send flow removed: False
>             .... .... .... ..0. = Check overlap: False
>             .... .... .... .0.. = Reset counts: False
>             .... .... .... 0... = Don't count packets: False
>             .... .... ...0 .... = Don't count bytes: False
>         Pad: 00000000
>         Cookie: 0x0000000000000000
>         Packet count: 0
>         Byte count: 0
>         Match
>             Type: OFPMT_OXM (1)
>             Length: 4
>             Pad: 00000000
>         Instruction
>             Type: OFPIT_GOTO_TABLE (1)
>             Length: 8
>             Table ID: 100
>             Pad: 000000
>     Flow stats
>         Length: 80
>         Table ID: 100
>         Pad: 00
>         Duration sec: 0
>         Duration nsec: 3000000
>         Priority: 1
>         Idle timeout: 0
>         Hard timeout: 0
>         Flags: 0x0000
>             .... .... .... ...0 = Send flow removed: False
>             .... .... .... ..0. = Check overlap: False
>             .... .... .... .0.. = Reset counts: False
>             .... .... .... 0... = Don't count packets: False
>             .... .... ...0 .... = Don't count bytes: False
>         Pad: 00000000
>         Cookie: 0x0000000000000000
>         Packet count: 0
>         Byte count: 0
>         Match
>             Type: OFPMT_OXM (1)
>             Length: 4
>             Pad: 00000000
>         Instruction
>             Type: OFPIT_APPLY_ACTIONS (4)
>             Length: 24
>             Pad: 00000000
>             Action
>                 Type: OFPAT_OUTPUT (0)
>                 Length: 16
>                 Port: 2
>                 Max length: 65509
>                 Pad: 000000000000
>     Flow stats
>         Length: 56
>         Table ID: 200
>         Pad: 00
>         Duration sec: 0
>         Duration nsec: 242000000
>         Priority: 0
>         Idle timeout: 0
>         Hard timeout: 0
>         Flags: 0x0000
>             .... .... .... ...0 = Send flow removed: False
>             .... .... .... ..0. = Check overlap: False
>             .... .... .... .0.. = Reset counts: False
>             .... .... .... 0... = Don't count packets: False
>             .... .... ...0 .... = Don't count bytes: False
>         Pad: 00000000
>         Cookie: 0x0000000000000000
>         Packet count: 0
>         Byte count: 0
>         Match
>             Type: OFPMT_OXM (1)
>             Length: 4
>             Pad: 00000000
> 
>  
> 
> The response is consistent with what I see on the HP switch tables.
> 
>  
> 
> Anybody have any experience with a similar issue?
> 
>  
> 
> Thank you for your time,
> 
>  
> 
> Ed Kiefer
> 
> Cornell University
> 
> Dept. of Computer Science
> 
>  
> 
>  
> 
> 
> 
> ------------------------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 

------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to