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 then I use p1 = multiprocessing.Process(target = add_flow, args = ( ... )) p2 = multiprocessing.Process(target = add_flow, args = ( ... )) p1.start() p2.start() I used tcpdump and wireshark and both show that openflow messages were sent. I have attached the tcpdump output and the wireshark capture. You can see that there are some messages around the middle that are Openflow messages. 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 the flows do get added but because of GIL, it isn't truly happening in parallel). Thank you, Yiwen On Sun, Apr 23, 2017 at 8:17 PM, Yi Tseng <a86487...@gmail.com> wrote: > 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 <a86487...@gmail.com>: > >> 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 <ys2...@columbia.edu>: >> >>> Hi, >>> >>> I have a function that takes arguments like datapath, inport, outport, >>> IP address, priority, and adds that flow onto that datapath. Then I create >>> multiple processes and each uses this function to add different flows. >>> >>> If I use the function normally, then the flows will get added, but if I >>> use multiprocessing with this function, the flows do not get added. >>> >>> Thank you, >>> Yiwen Shen >>> >>> >>> >>> On Apr 23, 2017 3:59 AM, "Yi Tseng" <a86487...@gmail.com> wrote: >>> >>> 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 <ys2...@columbia.edu>: >>> >>>> 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 >>>> >>>> ------------------------------------------------------------ >>>> ------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Ryu-devel mailing list >>>> Ryu-devel@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel >>>> >>>> >>> >>> >>> -- >>> Yi Tseng (a.k.a Takeshi) >>> Taiwan National Chiao Tung University >>> Department of Computer Science >>> W2CNLab >>> >>> https://takeshi.tw >>> >>> >>> >> >> >> -- >> Yi Tseng (a.k.a Takeshi) >> Taiwan National Chiao Tung University >> Department of Computer Science >> W2CNLab >> >> https://takeshi.tw >> > > > > -- > Yi Tseng (a.k.a Takeshi) > Taiwan National Chiao Tung University > Department of Computer Science > W2CNLab > > https://takeshi.tw > -- *Yiwen Shen* PhD Candidate at Lightwave Research Laboratory <http://lightwave.ee.columbia.edu/>
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eno1, link-type EN10MB (Ethernet), capture size 262144 bytes 18:24:43.711378 IP 128.59.87.121.6633 > 128.59.87.223.45675: Flags [R.], seq 0, ack 1726962875, win 0, length 0 18:24:51.711375 IP 128.59.87.121.6633 > 128.59.87.223.45676: Flags [S.], seq 730045996, ack 3145795434, win 28960, options [mss 1460,sackOK,TS val 179348636 ecr 2144687500,nop,wscale 7], length 0 18:24:51.711661 IP 128.59.87.121.6633 > 128.59.87.223.45676: Flags [.], ack 9, win 227, options [nop,nop,TS val 179348636 ecr 2144687500], length 0 18:24:51.714434 IP 128.59.87.121.6633 > 128.59.87.223.45676: Flags [P.], seq 1:9, ack 9, win 227, options [nop,nop,TS val 179348637 ecr 2144687500], length 8: OpenFlow version unknown (0x04), type 0x00, length 8, xid 0xfa4be336 18:24:51.714531 IP 128.59.87.121.6633 > 128.59.87.223.45676: Flags [P.], seq 9:17, ack 9, win 227, options [nop,nop,TS val 179348637 ecr 2144687500], length 8: OpenFlow version unknown (0x04), type 0x05, length 8, xid 0xfa4be337 18:24:51.717256 IP 128.59.87.121.6633 > 128.59.87.223.45676: Flags [P.], seq 17:33, ack 41, win 227, options [nop,nop,TS val 179348638 ecr 2144687500], length 16: OpenFlow version unknown (0x04), type 0x12, length 16, xid 0xfa4be338 18:24:51.756708 IP 128.59.87.121.6633 > 128.59.87.223.45676: Flags [.], ack 249, win 235, options [nop,nop,TS val 179348648 ecr 2144687501], length 0 18:24:56.711035 IP 128.59.87.121.6633 > 128.59.87.223.45676: Flags [.], ack 257, win 235, options [nop,nop,TS val 179349886 ecr 2144688750], length 0 18:24:56.712179 IP 128.59.87.121.6633 > 128.59.87.223.45676: Flags [P.], seq 33:41, ack 257, win 235, options [nop,nop,TS val 179349886 ecr 2144688750], length 8: OpenFlow version unknown (0x04), type 0x03, length 8, xid 0x00000000 18:25:01.712341 IP 128.59.87.121.6633 > 128.59.87.223.45676: Flags [P.], seq 41:49, ack 265, win 235, options [nop,nop,TS val 179351136 ecr 2144690000], length 8: OpenFlow version unknown (0x04), type 0x03, length 8, xid 0x00000000 18:25:06.712025 IP 128.59.87.121.6633 > 128.59.87.223.45676: Flags [P.], seq 49:57, ack 273, win 235, options [nop,nop,TS val 179352386 ecr 2144691250], length 8: OpenFlow version unknown (0x04), type 0x03, length 8, xid 0x00000000 18:25:10.026509 IP 128.59.87.121.6633 > 128.59.87.223.45676: Flags [F.], seq 57, ack 273, win 235, options [nop,nop,TS val 179353215 ecr 2144691250], length 0 18:25:10.026980 IP 128.59.87.121.6633 > 128.59.87.223.45676: Flags [.], ack 274, win 235, options [nop,nop,TS val 179353215 ecr 2144692079], length 0 18:25:10.712118 IP 128.59.87.121.6633 > 128.59.87.223.45677: Flags [R.], seq 0, ack 1974723613, win 0, length 0 18:25:12.711947 IP 128.59.87.121.6633 > 128.59.87.223.45678: Flags [R.], seq 0, ack 3268018402, win 0, length 0
multiprocessing_capture.pcapng
Description: application/pcapng
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel