Hi, I am using Mininet and openvswitch. I try to delete the flow entry by RYU controller, but it doesn't work This is function to del-flow which I change
*def del_flow(self, datapath, priority, in_port, out_port): ofproto = datapath.ofproto parser = datapath.ofproto_parser match = parser.OFPMatch(in_port=in_port) print ">>>>>DEBUG: Del flow <", datapath.id <http://datapath.id> ,"> in_port, out_put, priority: ", in_port, out_port, priority mod = parser.OFPFlowMod( datapath=datapath, match=match, out_port=out_port, command=ofproto.OFPFC_DELETE) datapath.send_msg(mod)* I debug on s1 switch, and I saw it receive the message del-flow. But it doesn't remove the flow entry # ovs-ofctl snoop s1 OFPT_FLOW_MOD (OF1.3) (xid=0xf61fb58b): DEL in_port=1 out_port:2 actions=drop I dump the flow entry, it still exit the flow entry. # ovs-ofctl dump-flows -O OpenFlow13 s1 *OFPST_FLOW reply (OF1.3) (xid=0x2): cookie=0x0, duration=26.302s, table=0, n_packets=46, n_bytes=2760, priority=65535,dl_dst=01:80:c2:00:00:0e,dl_type=0x88cc actions=CONTROLLER:65535 cookie=0x0, duration=16.068s, table=0, n_packets=17, n_bytes=1610, priority=50,in_port=1,dl_dst=00:00:00:00:00:02 actions=output:2 cookie=0x0, duration=16.068s, table=0, n_packets=8, n_bytes=672, priority=50,in_port=2,dl_dst=00:00:00:00:00:01 actions=output:1 cookie=0x0, duration=16.066s, table=0, n_packets=0, n_bytes=0, priority=10,in_port=1,dl_dst=00:00:00:00:00:02 actions=output:3 cookie=0x0, duration=16.066s, table=0, n_packets=0, n_bytes=0, priority=10,in_port=3,dl_dst=00:00:00:00:00:01 actions=output:1 cookie=0x0, duration=26.322s, table=0, n_packets=3, n_bytes=172, priority=0 actions=CONTROLLER:65535* I use the ovs-ofctl command to remove, it is okay *# ovs-ofctl del-flows s1 "in_port=1 out_port:2" -O OpenFlow13# ovs-ofctl dump-flows -O OpenFlow13 s1OFPST_FLOW reply (OF1.3) (xid=0x2): cookie=0x0, duration=142.445s, table=0, n_packets=175, n_bytes=10500, priority=65535,dl_dst=01:80:c2:00:00:0e,dl_type=0x88cc actions=CONTROLLER:65535 cookie=0x0, duration=132.211s, table=0, n_packets=8, n_bytes=672, priority=50,in_port=2,dl_dst=00:00:00:00:00:01 actions=output:1 cookie=0x0, duration=132.209s, table=0, n_packets=6, n_bytes=588, priority=10,in_port=1,dl_dst=00:00:00:00:00:02 actions=output:3 cookie=0x0, duration=132.209s, table=0, n_packets=0, n_bytes=0, priority=10,in_port=3,dl_dst=00:00:00:00:00:01 actions=output:1 cookie=0x0, duration=142.465s, table=0, n_packets=7, n_bytes=340, priority=0 actions=CONTROLLER:65535* Ask you see, the flow entry in_port=1 and out_port=2 is deleted. I would like to know why we use controller RYU? Thank your for your time. On Tue, Aug 30, 2016 at 7:40 PM, Quân Nguyễn Thanh <[email protected]> wrote: > Hi, > > It doesn't work. When I use with OFPFC_DELETE option, it remove all flow > entry. > I also try remove by ovs-ofctl command on openvswitch. > > # ovs-ofctl del-flows s3 "priority=50" -O OpenFlow13 > ovs-ofctl: unknown keyword priority > > It means that openvswitch doesn't support, right? > > Thank you. > > > > > On Tue, Aug 30, 2016 at 10:35 AM, IWAMOTO Toshihiro <[email protected] > > wrote: > >> At Tue, 30 Aug 2016 11:49:27 +0900, >> Iwase Yusuke wrote: >> > >> > Hi, >> > >> > Please CC [email protected] and keep this mailing this. >> > >> > How about specifying out_port=ofproto.OFPP_ANY and >> out_group=ofproto.OFPG_ANY >> > to OFPFlowMod message? >> > e.g.) >> > mod = parser.OFPFlowMod(datapath=datapath, cookie=0, >> > priority=priority, >> > out_port=ofproto.OFPP_ANY, >> > out_group=ofproto.OFPG_ANY, >> > command=ofproto.OFPFC_DELETE_STRICT) >> > >> > Thunks, >> > Iwase >> >> Use OFPFC_DELETE instead of OFPFC_DELETE_STRICT? >> >> > >> > On 2016年08月30日 09:44, Quân Nguyễn Thanh wrote: >> > > Hi Iwase Yusuke, >> > > >> > > Sorry, if I borther you. >> > > I'm using OF1.3 with RYU, I would like to remove flow entry basing on >> the >> > > priority at all. As below function, but it doesn't work, could you >> please >> > > point out my mistake? >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > *def del_flow(self, datapath, priority): ofproto = >> > > datapath.ofproto parser = datapath.ofproto_parser >> #match = >> > > {} mod = parser.OFPFlowMod( datapath=datapath, >> cookie=0, >> > > priority=priority, command=ofproto.OFPFC_DELETE_STRICT) >> > > datapath.send_msg(mod)* >> > > >> > > Thank you for your help. >> > > >> > >> > ------------------------------------------------------------ >> ------------------ >> > _______________________________________________ >> > Ryu-devel mailing list >> > [email protected] >> > https://lists.sourceforge.net/lists/listinfo/ryu-devel >> > > > > -- > Best regards, > Quan Nguyen > > -- Best regards, Quan Nguyen
------------------------------------------------------------------------------
_______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
