Good morning,

Actually, I was sure about the matching field. And I didn't want to take
the priority in consideration. My problem
was solved when i changed this:

mod = parser.OFPFlowMod(datapath=datapath,match=match, cookie=0,command=
*ofproto_v1_3*.OFPFC_DELETE,out_port=*ofproto_v1_3*.OFPP_ANY,
out_group=*ofproto_v1_3*.OFPG_ANY, idle_timeout=0,
hard_timeout=0,priority=2,flags=ofproto.OFPFF_SEND_FLOW_REM)
        datapath.send_msg(mod)

I don't know if it is because I am using the OpenFlow 1.3 despite the fact
that I saw several codes examples using OpenFlow 1.3 and using
ofproto.OFPFC_DELETE.

Anyway thank you for your response.

On Thu, Apr 12, 2018 at 4:34 AM, IWAMOTO Toshihiro <iwam...@valinux.co.jp>
wrote:

> On Wed, 11 Apr 2018 23:41:18 +0900,
> nadia mouawad wrote:
> >
> > Good morning,
> > I have a question concerning deleting flows.  My code is the following:
> >     def del_flow(self, datapath, match):
> >         ofproto = datapath.ofproto
> >         parser = datapath.ofproto_parser
> >         #actions1 = [parser.OFPActionOutput(ofproto.OFPP_CONTROLLER,
> > ofproto.OFPCML_NO_BUFFER)]
> >         #if actions!=actions1:
> >         mod = parser.OFPFlowMod(datapath=datapath,match=match,
> > cookie=0,command=ofproto.OFPFC_DELETE,out_port=ofproto.OFPP_ANY,
> > out_group=ofproto.OFPG_ANY, idle_timeout=0,
> > hard_timeout=0,priority=2,flags=ofproto.OFPFF_SEND_FLOW_REM)
>
> You are using the non-strict delete command. The priority field
> (and timeout fields too, IIRC) will be ignored.
>
> >         datapath.send_msg(mod)
> >         # get buffer from the send queue
> >         #buf = datapath.send_q.get()
> >         # send buffer
> >         #datapath.socket.sendall(buf)
> >         print("delete flow %s",datapath.id ,mod)
> >     """
> >
> >
> > However, when I try to call del_flow, flows are not deleted. Can you help
> > me fix this problem??
> >
>
> Do you get any errors? I guess the match field isn't matching against
> your flows.
>
> --
> IWAMOTO Toshihiro
>
------------------------------------------------------------------------------
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