Hi, I have written an app for Ryu that is pushing flows (see output of a print of the "mod" variable at the end of the "add_flow" method). I added a result variable to see that the 'datapath.send_msg' executed successfully. However as you can see from the cURL output at the bottom, there are no flows actually injected. The switch is reporting a "OFPBMC_BAD_PREREQ" error in response to the FLOW_MOD attempts and is only accepting the generic OUTPUT:CONTROLLER one.
{extract from the end of "add_flow" method, only changes are in blue} result = datapath.send_msg(mod) print(f"DATAPATH ID:{datapath.id}") print(f"RESULT: {result}") print(mod, '\n') DATAPATH ID:176199429686713 RESULT: True version=0x4,msg_type=0xe,msg_len=0x50,xid=0xe59050d2,OFPFlowMod(buffer_id=4294967295,command=0,cookie=0,cookie_mask=0,flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPInstructionActions(actions=[OFPActionOutput(len=16,max_len=65535,port=4294967293,type=0)],len=24,type=4)],match=OFPMatch(oxm_fields={}),out_group=0,out_port=0,priority=0,table_id=0) DATAPATH ID:176199429686713 RESULT: True version=0x4,msg_type=0xe,msg_len=0x78,xid=0xe59050d3,OFPFlowMod(buffer_id=256,command=0,cookie=0,cookie_mask=0,flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPInstructionActions(actions=[OFPActionOutput(len=16,max_len=65509,port=1,type=0)],len=24,type=4)],match=OFPMatch(oxm_fields={'in_port': 24, 'eth_src': 'c4:71:fe:10:fe:00', 'ipv6_dst': 'ff02::1:ff00:234'}),out_group=0,out_port=0,priority=100,table_id=0) DATAPATH ID:176199429686713 RESULT: True version=0x4,msg_type=0xe,msg_len=0x68,xid=0xe59050d4,OFPFlowMod(buffer_id=258,command=0,cookie=0,cookie_mask=0,flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPInstructionActions(actions=[OFPActionOutput(len=16,max_len=65509,port=24,type=0)],len=24,type=4)],match=OFPMatch(oxm_fields={'in_port': 1, 'eth_src': '00:16:3e:66:dd:28', 'ipv4_dst': '199.9.9.33'}),out_group=0,out_port=0,priority=100,table_id=0) DATAPATH ID:176199429686713 RESULT: True version=0x4,msg_type=0xe,msg_len=0x78,xid=0xe59050d5,OFPFlowMod(buffer_id=261,command=0,cookie=0,cookie_mask=0,flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPInstructionActions(actions=[OFPActionOutput(len=16,max_len=65509,port=1,type=0)],len=24,type=4)],match=OFPMatch(oxm_fields={'in_port': 22, 'eth_src': '00:23:5e:0e:68:16', 'ipv6_dst': 'ff02::1:ff00:1'}),out_group=0,out_port=0,priority=100,table_id=0) DATAPATH ID:176199429686713 RESULT: True version=0x4,msg_type=0xe,msg_len=0x78,xid=0xe59050d6,OFPFlowMod(buffer_id=262,command=0,cookie=0,cookie_mask=0,flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPInstructionActions(actions=[OFPActionOutput(len=16,max_len=65509,port=24,type=0)],len=24,type=4)],match=OFPMatch(oxm_fields={'in_port': 1, 'eth_src': '00:16:3e:66:dd:28', 'ipv6_dst': 'ff02::1:ff00:33'}),out_group=0,out_port=0,priority=100,table_id=0) DATAPATH ID:176199429686713 RESULT: True version=0x4,msg_type=0xe,msg_len=0x68,xid=0xe59050d7,OFPFlowMod(buffer_id=263,command=0,cookie=0,cookie_mask=0,flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPInstructionActions(actions=[OFPActionOutput(len=16,max_len=65509,port=23,type=0)],len=24,type=4)],match=OFPMatch(oxm_fields={'in_port': 1, 'eth_src': '00:16:3e:a6:e3:c3', 'ipv4_dst': '199.9.9.22'}),out_group=0,out_port=0,priority=100,table_id=0) DATAPATH ID:176199429686713 RESULT: True version=0x4,msg_type=0xe,msg_len=0x78,xid=0xe59050d8,OFPFlowMod(buffer_id=265,command=0,cookie=0,cookie_mask=0,flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPInstructionActions(actions=[OFPActionOutput(len=16,max_len=65509,port=23,type=0)],len=24,type=4)],match=OFPMatch(oxm_fields={'in_port': 1, 'eth_src': '00:16:3e:35:d7:55', 'ipv6_dst': 'ff02::1:ff00:22'}),out_group=0,out_port=0,priority=100,table_id=0) DATAPATH ID:176199429686713 RESULT: True version=0x4,msg_type=0xe,msg_len=0x68,xid=0xe59050d9,OFPFlowMod(buffer_id=269,command=0,cookie=0,cookie_mask=0,flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPInstructionActions(actions=[OFPActionOutput(len=16,max_len=65509,port=23,type=0)],len=24,type=4)],match=OFPMatch(oxm_fields={'in_port': 1, 'eth_src': '00:16:3e:35:d7:55', 'ipv4_dst': '199.9.9.22'}),out_group=0,out_port=0,priority=100,table_id=0) DATAPATH ID:176199429686713 RESULT: True version=0x4,msg_type=0xe,msg_len=0x78,xid=0xe59050da,OFPFlowMod(buffer_id=277,command=0,cookie=0,cookie_mask=0,flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPInstructionActions(actions=[OFPActionOutput(len=16,max_len=65509,port=1,type=0)],len=24,type=4)],match=OFPMatch(oxm_fields={'in_port': 23, 'eth_src': '00:1e:be:17:eb:9a', 'ipv6_dst': 'ff02::1:ff00:234'}),out_group=0,out_port=0,priority=100,table_id=0) DATAPATH ID:176199429686713 RESULT: True version=0x4,msg_type=0xe,msg_len=0x78,xid=0xe59050db,OFPFlowMod(buffer_id=307,command=0,cookie=0,cookie_mask=0,flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPInstructionActions(actions=[OFPActionOutput(len=16,max_len=65509,port=22,type=0)],len=24,type=4)],match=OFPMatch(oxm_fields={'in_port': 1, 'eth_src': '00:16:3e:a6:e3:c3', 'ipv6_dst': 'ff02::1:ff00:11'}),out_group=0,out_port=0,priority=100,table_id=0) ~$ curl -X GET http://localhost:8080/stats/flow/176199429686713; echo {"176199429686713": [{"priority": 0, "cookie": 0, "idle_timeout": 0, "hard_timeout": 0, "byte_count": 4127479, "duration_sec": 26, "duration_nsec": 829000000, "packet_count": 57209, "length": 80, "flags": 0, "actions": ["OUTPUT:CONTROLLER"], "match": {}, "table_id": 0}]} The switch is reporting the following errors. 1970-01-01T02:46:36Z|00775|connmgr|INFO|ofswitch<->tcp:198.8.8.235:6633: sending OFPBMC_BAD_PREREQ error reply to OFPT_FLOW_MOD message 1970-01-01T02:46:36Z|00776|connmgr|INFO|ofswitch<->tcp:198.8.8.235:6633: sending OFPBMC_BAD_PREREQ error reply to OFPT_FLOW_MOD message 1970-01-01T02:46:36Z|00777|connmgr|INFO|ofswitch<->tcp:198.8.8.235:6633: sending OFPBMC_BAD_PREREQ error reply to OFPT_FLOW_MOD message 1970-01-01T02:46:36Z|00778|connmgr|INFO|ofswitch<->tcp:198.8.8.235:6633: sending OFPBMC_BAD_PREREQ error reply to OFPT_FLOW_MOD message 1970-01-01T02:46:36Z|00779|connmgr|INFO|ofswitch<->tcp:198.8.8.235:6633: sending OFPBMC_BAD_PREREQ error reply to OFPT_FLOW_MOD message 1970-01-01T02:46:36Z|00780|connmgr|INFO|ofswitch<->tcp:198.8.8.235:6633: sending OFPBMC_BAD_PREREQ error reply to OFPT_FLOW_MOD message 1970-01-01T02:46:36Z|00781|connmgr|INFO|ofswitch<->tcp:198.8.8.235:6633: sending OFPBMC_BAD_PREREQ error reply to OFPT_FLOW_MOD message 1970-01-01T02:46:36Z|00782|connmgr|INFO|ofswitch<->tcp:198.8.8.235:6633: sending OFPBMC_BAD_PREREQ error reply to OFPT_FLOW_MOD message 1970-01-01T02:46:36Z|00783|connmgr|INFO|ofswitch<->tcp:198.8.8.235:6633: sending OFPBMC_BAD_PREREQ error reply to OFPT_FLOW_MOD message -- *Irish by birth, located in Uganda but Munster by the grace of God.*
_______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel