Discussion:
[Ryu-devel] [RYU] Delete flow entry basing on priority
Iwase Yusuke
2016-08-30 02:49:27 UTC
Permalink
Hi,

Please CC ryu-***@lists.sourceforge.net 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
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.
------------------------------------------------------------------------------
IWAMOTO Toshihiro
2016-08-30 03:35:21 UTC
Permalink
At Tue, 30 Aug 2016 11:49:27 +0900,
Post by Iwase Yusuke
Hi,
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?
Post by Iwase Yusuke
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
https://lists.sourceforge.net/lists/listinfo/ryu-devel
------------------------------------------------------------------------------
Quân Nguyễn Thanh
2016-08-30 12:40:20 UTC
Permalink
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.
Post by IWAMOTO Toshihiro
At Tue, 30 Aug 2016 11:49:27 +0900,
Post by Iwase Yusuke
Hi,
How about specifying out_port=ofproto.OFPP_ANY and
out_group=ofproto.OFPG_ANY
Post by Iwase Yusuke
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?
Post by Iwase Yusuke
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
Post by Iwase Yusuke
priority at all. As below function, but it doesn't work, could you
please
Post by Iwase Yusuke
point out my mistake?
*def del_flow(self, datapath, priority): ofproto =
datapath.ofproto parser = datapath.ofproto_parser #match
=
Post by Iwase Yusuke
{} mod = parser.OFPFlowMod( datapath=datapath,
cookie=0,
Post by Iwase Yusuke
priority=priority, command=ofproto.OFPFC_DELETE_STRICT)
datapath.send_msg(mod)*
Thank you for your help.
------------------------------------------------------------
------------------
Post by Iwase Yusuke
_______________________________________________
Ryu-devel mailing list
https://lists.sourceforge.net/lists/listinfo/ryu-devel
--
Best regards,
Quan Nguyen
Quân Nguyễn Thanh
2016-08-30 15:31:28 UTC
Permalink
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.
Post by Quân Nguyễn Thanh
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.
Post by IWAMOTO Toshihiro
At Tue, 30 Aug 2016 11:49:27 +0900,
Post by Iwase Yusuke
Hi,
How about specifying out_port=ofproto.OFPP_ANY and
out_group=ofproto.OFPG_ANY
Post by Iwase Yusuke
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?
Post by Iwase Yusuke
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
Post by Iwase Yusuke
priority at all. As below function, but it doesn't work, could you
please
Post by Iwase Yusuke
point out my mistake?
*def del_flow(self, datapath, priority): ofproto =
datapath.ofproto parser = datapath.ofproto_parser
#match =
Post by Iwase Yusuke
{} mod = parser.OFPFlowMod( datapath=datapath,
cookie=0,
Post by Iwase Yusuke
priority=priority, command=ofproto.OFPFC_DELETE_STRICT)
datapath.send_msg(mod)*
Thank you for your help.
------------------------------------------------------------
------------------
Post by Iwase Yusuke
_______________________________________________
Ryu-devel mailing list
https://lists.sourceforge.net/lists/listinfo/ryu-devel
--
Best regards,
Quan Nguyen
--
Best regards,
Quan Nguyen
IWAMOTO Toshihiro
2016-08-31 05:53:50 UTC
Permalink
At Tue, 30 Aug 2016 19:40:20 +0700,
[1 <text/plain; UTF-8 (quoted-printable)>]
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?
The short answer would be you cannot do what you want with a single
openflow command.

I checked the OpenFlow spec.
The priority field is used by OFPFC_DELETE_STRICT messages but not by
OFPFC_DELETE messages. And OFPFC_DELETE_STRICT messages don't do
wildcard matches.

You'll need to dump the entire flow table (OFPFlowStatsRequest) and
filter by priority in your python code.
Post by IWAMOTO Toshihiro
At Tue, 30 Aug 2016 11:49:27 +0900,
Post by Iwase Yusuke
Hi,
How about specifying out_port=ofproto.OFPP_ANY and
out_group=ofproto.OFPG_ANY
Post by Iwase Yusuke
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?
Post by Iwase Yusuke
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
Post by Iwase Yusuke
priority at all. As below function, but it doesn't work, could you
please
Post by Iwase Yusuke
point out my mistake?
*def del_flow(self, datapath, priority): ofproto =
datapath.ofproto parser = datapath.ofproto_parser #match
=
Post by Iwase Yusuke
{} mod = parser.OFPFlowMod( datapath=datapath,
cookie=0,
Post by Iwase Yusuke
priority=priority, command=ofproto.OFPFC_DELETE_STRICT)
datapath.send_msg(mod)*
Thank you for your help.
------------------------------------------------------------
------------------
Post by Iwase Yusuke
_______________________________________________
Ryu-devel mailing list
https://lists.sourceforge.net/lists/listinfo/ryu-devel
--
Best regards,
Quan Nguyen
[2 <text/html; UTF-8 (quoted-printable)>]
------------------------------------------------------------------------------
Loading...