Hi, Here is a way to do.

    def remove_table_flows(self, datapath, table_id, match, instructions):
        """Create OFP flow mod message to remove flows from table."""
        ofproto = datapath.ofproto
        flow_mod = datapath.ofproto_parser.OFPFlowMod(datapath, 0, 0,
table_id,
                                                      ofproto.OFPFC_DELETE,
0, 0,
                                                      1,

ofproto.OFPCML_NO_BUFFER,
                                                      ofproto.OFPP_ANY,
                                                      OFPG_ANY, 0,
                                                      match, instructions)
        return flow_mod


Use this part where you want to delete all the flows.

        empty_match = parser.OFPMatch()
        instructions = []
        flow_mod = self.remove_table_flows(datapath, 0,
                                        empty_match, instructions)
        print "deleting all flow entries in table ", 0
        datapath.send_msg(flow_mod)

Cheers.


2014-05-13 10:04 GMT-03:00 chen zhang <[email protected]>:

> hi,everyone:
>     when i want to remove all flows of table 1.i code that
>       " match = parser.OFPMatch()
>         instructions = []
>         flow_mod = datapath.ofproto_parser.OFPFlowMod(datapath, 0, 0,
> table_id,
>
> ofproto.OFPFC_DELETE, 0, 0,
>                                                       1,
>
> ofproto.OFPCML_NO_BUFFER,
>                                                       ofproto.OFPP_ANY,
>                                                       ofproto.OFPG_ANY, 0,
>                                                       match, instructions)
>         datapath.send_msg(flow_mod)"
>
>         when ovs-ofctl snoop s1,ovs tells that
>         "OFPT_FLOW_MOD (OF1.3) (xid=0x5f86181b): DEL table:3 priority=1
> buf:0xffff actions=drop"
>         and it fails to delete the flow entry of priority of 32768 and
> 0.is it concerned with priority field?but i think the priority is
> neglected in OFPC_DELETE .
>         and does "actions=drop"   impact the flow_delete?if it does,how
> should i specify the aciton field?
>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform
> available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
>


-- 
*Eros S. Spalla* -
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to