Hi everybody,
     I'm a new one about the Ryu controller and would like to clarify a
basic issuse. I'm working with the mininet 2.2 and Ryu 4.24 with the
openflow 1.3.
     I have installed flow entries in switches successfuly, but now I want
to delete the flow entries whose action is  out_port=port_no in one
datapath, when a link is down in the mininet topology. Unfortunely,
anything happens. Could you give me some suggestions about how to delete
the specific flow entries in Ryu with the OFPFC_DELETE? Thanks a lot!

Sincerely,

                             Liuwei Huo



Part codes as follow:
def flow(self,datapath,port_no):
       ofproto=datapath.ofproto
        parser=datapath.ofproto_parser
        cmd = ofproto.OFPFC_DELETE
        match=parser.OFPMatch()  #wildcard
        mod = parser.OFPFlowMod(datapath=datapath,
cookie=0,cookie_mask=0,table_id=ofproto.OFPTT_ALL,

flags=ofproto.OFPFF_SEND_FLOW_REM,match=match,command=cmd,
                                                     out_port=port_no)
        datapath.send_msg(mod)

events = [event.EventPortModify]
@set_ev_cls(events)
def topology_changes(self,ev):
        if isinstance(ev,event.EventPortModify):
                port = ev.port
                if port.is_down():

self.del_flow(self.switches.dps[port.dpid],port.port_no)
                        self.logger.info("Delete the flow entries when the
port %d is down"%(port.port_no))
                        return
------------------------------------------------------------------------------
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

Reply via email to