Hi,
I have a slightly modified version of the simple_switch.py program.The code
is given here.
https://github.com/karthik82/ryu/blob/master/ryu/app/simple_switch.py
I start the above application from RYU as follows.
bin/ryu-manager ryu/app/simple_switch.py
I have a simple mininet topology consisting of 6 switches and 6 hosts to
this RYU controller program.The topology file is
https://github.com/karthik82/ryu_extras/blob/master/mininet/custom/topo-onos-2.py
I start mininet topology as below to connect to RYU simple_switch
application running on the same machine.
sudo python custom/topo-onos-2.py
As you can see from simple_switch.py in the above github link,My
application handles the following events.
ofp_event.EventOFPPacketIn
ofp_event.EventOFPPortStatus
ofp_event.EventOFPSwitchFeatures
The output that I get on the terminal of RYU running simple_switch is given
below.
loading app ryu/app/simple_switch.py
loading app ryu.controller.ofp_handler instantiating app
ryu.controller.ofp_handler of OFPHandler instantiating app
ryu/app/simple_switch.py of SimpleSwitch simple switch - switch features
handler datapath id 513 simple switch - switch features handler datapath id
514 simple switch - switch features handler datapath id 515 simple switch -
switch features handler datapath id 516 simple switch - switch features
handler datapath id 517 simple switch - switch features handler datapath id
518 simple switch - port_status_handler
OFPPhyPort(port_no=1,hw_addr='32:31:04:fd:5d:2b',name='s1-eth1',config=0,state=0,curr=192,advertised=0,supported=0,peer=0)
As you can see above
*_switch_features_handler*
* *is called 6 times once for each switch.**
_port_status_handler is called only once*.*
What is the reason for the above behaviour? Shouldn't the application get
an
EventOFPPortStatus when each new port is added? So I would expect 12
PortStatus messages for this topology.(2 ports X 6 switches)
Am I wrong in my understanding or assumption?
Regards,
Karthik.
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel