[Ryu-devel] Using multiprocessing to modify flows

2017-04-22 Thread Yiwen Shen
Hi, In order to add flows in parallel from a controller I'm using python's multiprocessing library to create separate processes, each to add flows. However I've observed that in many situations flows don't get properly added. Can you please help? Thank you, Yiwen Shen

Re: [Ryu-devel] Using multiprocessing to modify flows

2017-04-23 Thread Yi Tseng
Hi, How do you create multiple process? You create multiple Ryu process? If you create multiple Ryu process, you need to connect switch to all process. Or you need to share the connection between processes and switches -Yi 2017-04-22 12:19 GMT-07:00 Yiwen Shen : > Hi, > > In order to add flo

Re: [Ryu-devel] Using multiprocessing to modify flows

2017-04-23 Thread Yi Tseng
Hi, *Please don't drop mailing list.* Is there any warning/error log? (run Ryu with --verbose) How did you share OpenFlow sessions between processes? -Yi 2017-04-23 16:53 GMT-07:00 Yiwen Shen : > Hi, > > I have a function that takes arguments like datapath, inport, outport, IP > address, prio

Re: [Ryu-devel] Using multiprocessing to modify flows

2017-04-23 Thread Yi Tseng
Also, I am not sure if you processes did send OpenFlow message correctly. Can you verify OpenFlow messages sent by controller by using tcpdump or Wireshark? -- Yi 2017-04-23 17:04 GMT-07:00 Yi Tseng : > Hi, > > *Please don't drop mailing list.* > > Is there any warning/error log? (run Ryu with

Re: [Ryu-devel] Using multiprocessing to modify flows

2017-04-24 Thread Yiwen Shen
Hi, I ran it with --verbose and nothing out of the ordinary appeared. I'm not sure what you mean by sharing OpenFlow sessions between processes. I'm just attaching the function that adds flows into different processes, like I have a function called add_flow(in_port, out_port, ip_dst, ...), and th

Re: [Ryu-devel] Using multiprocessing to modify flows

2017-04-24 Thread Yi Tseng
Hi, I didn't see any *FLOW_ADD* message, is this correct pcap file? -- Yi 2017-04-24 15:46 GMT-07:00 Yiwen Shen : > Hi, > > I ran it with --verbose and nothing out of the ordinary appeared. > > I'm not sure what you mean by sharing OpenFlow sessions between processes. > I'm just attaching the f

Re: [Ryu-devel] Using multiprocessing to modify flows

2017-04-24 Thread William Fisher
On Mon, Apr 24, 2017 at 3:46 PM, Yiwen Shen wrote: > > If I just do add_flow(..) by itself the flows will get added properly onto the switch, but if I do multiprocessing it doesn't appear. However, multiprocessing is the only way I know to do this stuff in parallel. (I've tried multithreading, and

Re: [Ryu-devel] Using multiprocessing to modify flows

2017-04-24 Thread Yiwen Shen
I am testing the controller to do parallel flow addition/deletions, in order to see how fast the controller can add or delete a large number of flows. Because in a large network, you may need to add thousands of flows and it needs to be done in parallel so that the network can be scalable. You may

Re: [Ryu-devel] Using multiprocessing to modify flows

2017-04-25 Thread Tao Li
I think, even if you only start one single process to add a flow, the connection (object) between the controller and switch is still owned by the root process, in which you start your delegate process. In the case that you want to add more computation capacity, maybe you can perform the computat

Re: [Ryu-devel] Using multiprocessing to modify flows

2017-04-25 Thread Yiwen Shen
Alright thank you. So I guess there is no method to send out multiple flows in parallel by Ryu? On Tue, Apr 25, 2017 at 5:22 AM, Tao Li wrote: > I think, even if you only start one single process to add a flow, the > connection (object) between the controller and switch is still owned by the > r

Re: [Ryu-devel] Using multiprocessing to modify flows

2017-04-25 Thread Yi Tseng
Hi In my opinion, you can create multiple instance of Ryu controller, and connect switch to all controllers. You need to design mechanism for syncing flow data between multiple controller instances. --Yi 2017-04-25 12:54 GMT-07:00 Yiwen Shen : > Alright thank you. So I guess there is no metho

Re: [Ryu-devel] Using multiprocessing to modify flows

2017-04-25 Thread Yiwen Shen
How do you create multiple instances of the Ryu controller? On Tue, Apr 25, 2017 at 7:57 PM, Yi Tseng wrote: > Hi > > In my opinion, you can create multiple instance of Ryu controller, and > connect switch to all controllers. > > You need to design mechanism for syncing flow data between multipl

Re: [Ryu-devel] Using multiprocessing to modify flows

2017-04-25 Thread Yi Tseng
Hi For me, I just start multiple Ryu controller with different IP/TCP port And create connection between controllers(by simple socket) -- Yi 2017-04-25 20:31 GMT-07:00 Yiwen Shen : > How do you create multiple instances of the Ryu controller? > > On Tue, Apr 25, 2017 at 7:57 PM, Yi Tseng wrot

Re: [Ryu-devel] Using multiprocessing to modify flows

2017-04-25 Thread Yiwen Shen
I see, thank you. On Apr 26, 2017 2:35 AM, "Yi Tseng" wrote: > Hi > > For me, I just start multiple Ryu controller with different IP/TCP port > > And create connection between controllers(by simple socket) > > -- > Yi > > 2017-04-25 20:31 GMT-07:00 Yiwen Shen : > >> How do you create multiple i