On Tue, Jul 03, 2018 at 02:40:51PM +0200, Nicolas Bonnand wrote:
> Hello,
> 
> I am struggling to find correct syntax to delete a specific "empty
> condition" flow.
> ( I am developing an opensource python-Qt gui for OvS, and this gui must be
> able to edit/delete OpenFlow rules whatever complex they are )
> 
> To demonstrate, here is a set of flows
> 
> # ovs-ofctl --no-stats dump-flows brdemo
> in_port=P02 actions=set_queue:12,NORMAL
>  in_port=P03 actions=set_queue:13,NORMAL
>  actions=set_queue:50,NORMAL <=== I want to remove this flow ONLY !!!
>  priority=0 actions=NORMAL
> 
> 
> This example was created like this:
> 
> # ovs-ofctl add-flow brdemo 'in_port=1002 actions=set_queue:12,NORMAL'
> # ovs-ofctl add-flow brdemo 'in_port=1003 actions=set_queue:13,NORMAL'
> # ovs-ofctl add-flow brdemo 'priority=0 actions=NORMAL'
> # ovs-ofctl add-flow brdemo 'ip_src=10.0.0.2,actions=set_queue:50,NORMAL'
> ( Yes I know that 'ip,' is missing, but let's keep it like this )
> 2018-07-03T12:13:33Z|00001|ofp_util|INFO|normalization changed ofp_match,
> details:
> 2018-07-03T12:13:33Z|00002|ofp_util|INFO| pre: nw_src=10.0.0.2
> 2018-07-03T12:13:33Z|00003|ofp_util|INFO|post:
> 
> 
> In order to delete 'actions=set_queue:50,NORMAL' , I have tried following
> commands without any success:
> 
> # ovs-ofctl --strict del-flows brdemo table=0
> # ovs-ofctl --strict del-flows brdemo table=0,priority=32768
> # ovs-ofctl --strict del-flows brdemo priority=32768
> # ovs-ofctl --strict del-flows brdemo ''
> # ovs-ofctl --strict del-flows brdemo ' '
> # ovs-ofctl --strict del-flows brdemo '""'
> ovs-ofctl: field "" missing value
> # ovs-ofctl --strict del-flows brdemo '" "'
> ovs-ofctl: field " missing value
> # ovs-ofctl --strict del-flows brdemo "''"
> ovs-ofctl: field '' missing value
> ]# ovs-ofctl --strict del-flows brdemo "' '"
> ovs-ofctl: field ' missing value
> # ovs-ofctl --strict del-flows brdemo ', '
> # ovs-ofctl --strict del-flows brdemo ' ,'
> 
> I even tried to specifiy openflow versions 11,12,13 and 14....
> #ovs-ofctl --strict -O openflow10 del-flows brdemo table=0
> etc....
> 
> 
> At the end, I still have this undestroyable flow... :-(
> 
>  # ovs-ofctl --no-stats dump-flows brdemo
>  in_port=P02 actions=set_queue:12,NORMAL
>  in_port=P03 actions=set_queue:13,NORMAL
>  actions=set_queue:50,NORMAL <============== It is still here !!!
>  priority=0 actions=NORMAL
> 
> 
> I have read similar problem in this thread
> https://www.mail-archive.com/dev@openvswitch.org/msg09640.html but answer
> is not working in my example.
> 
> Could you please advise ?
> (Of course I could delete the whole table 0 by using ovs-ofctl del-flows
> brdemo 'table=0', but this not what I want ! )

$ ovs-vsctl add-br br0
$ ovs-ofctl add-flow br0 'ip_src=10.0.0.2,actions=set_queue:50,NORMAL'
2018-07-03T15:31:50Z|00001|ofp_match|INFO|normalization changed ofp_match, 
details:
2018-07-03T15:31:50Z|00002|ofp_match|INFO| pre: nw_src=10.0.0.2
2018-07-03T15:31:50Z|00003|ofp_match|INFO|post: 
$ ovs-ofctl dump-flows br0
 cookie=0x0, duration=1.248s, table=0, n_packets=0, n_bytes=0, 
actions=set_queue:50,NORMAL
 cookie=0x0, duration=3.028s, table=0, n_packets=0, n_bytes=0, priority=0 
actions=NORMAL
$ ovs-ofctl --strict del-flows br0 ''
$ ovs-ofctl dump-flows br0
 cookie=0x0, duration=3.850s, table=0, n_packets=0, n_bytes=0, 
actions=set_queue:50,NORMAL
 cookie=0x0, duration=5.630s, table=0, n_packets=0, n_bytes=0, priority=0 
actions=NORMAL
$ ovs-ofctl --strict del-flows br0 ip_src=10.0.0.2
2018-07-03T15:31:55Z|00001|ofp_match|INFO|normalization changed ofp_match, 
details:
2018-07-03T15:31:55Z|00002|ofp_match|INFO| pre: nw_src=10.0.0.2
2018-07-03T15:31:55Z|00003|ofp_match|INFO|post: 
$ ovs-ofctl dump-flows br0
 cookie=0x0, duration=7.993s, table=0, n_packets=0, n_bytes=0, priority=0 
actions=NORMAL
$ 
_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to