Hello,
Were having trouble deleting OpenFlow rules using the OFPFC_DELETE or OFPFC_DELETE_STRICT commands that send a Ryu controller to the OVS switch. What you did that make the problem appear: The Ryu controller sends OFPFC_DELETE or OFPFC_DELETE_STRICT commands to the OVS switch in order to delete a flow rule matching certain criteria (e.g., outport). What you expected to happen: The OVS switch receives the aforementioned command and deletes the flows that match the criteria. What actually happened: The matching criteria flows still appear in the OpenFlow tables. Although, I can see that apparently a flow was removed in the OVS database. The Open vSwitch version number: ovs-vswitchd (Open vSwitch) 2.15.90 The kernel version on which OVS is running: Linux version 4.15.0-140-generic (buildd@lgw01-amd64-054) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) The distribution and version number of my OS: Ubuntu 18.04 A workaround is to establish an SSH connection to the host where OVS is running and execute ovs-ofctl del-flows <bridge> <criteria>. An automatic way to do it from the Ryu controller is using the Paramiko library to send remotely the command. We attach a screenshot (bug_report.png) where you can see the information in the OVS database at the moment the controller sends OFPFC_DELETE or OFPFC_DELETE_STRICT commands. In order to clarify our use case, I share the method that should delete the flows according to certain outport match. Our scenario is formed by a Ryu Controller (version 4.34) and an OVS switch (version 2.15.90) that interconnect several machines. Both applications (controller and OVS switch) run in the same VM with Ubuntu Server 18.04. Our idea is to delete the existing OpenFlow rules associated to a given a port that connects a failed host. As you can see in the method to delete the flows, we save the information port in a dictionary called host_ovsports where the keys are the host id and the values are the OVS ports. Thus, the controller can know the port that connects a given host. def del_flow(): """ Delete specific flows taking into account a matching outport """ outport = host_ovsports[host_id] ofproto = switch_datapath.ofproto parser = switch_datapath.ofproto_parser cmd = ofproto.OFPFC_DELETE match = parser.OFPMatch() mod = parser.OFPFlowMod(datapath= switch_datapath, table_id=ofproto.OFPTT_ALL, command=cmd, out_port=outport) switch_datapath.send_msg(mod) I also attach a simplified topology of our use case and what we want to do (Bug_report.jpg). If you need more information let me know. We are having a similar problem to the one described in the following link: <https://ryu-devel.narkive.com/i8Kl0aFy/ryu-delete-flow-entry-basing-on-prio rity#post4> https://ryu-devel.narkive.com/i8Kl0aFy/ryu-delete-flow-entry-basing-on-prior ity#post4 They are trying to delete a flow based on the priority and we want to do it by taking into account the outport. Additionally, we tried several options to delete flow rules but we were unavailable to do it through the controller. Thanks you very much in advance. Kind regards, Alejandro Llorens -- El software de antivirus Avast ha analizado este correo electrónico en busca de virus. https://www.avast.com/antivirus
_______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel