[ovs-discuss] When deleting a group, flows from table other than 0 are not removed.
Zoltán Balogh
zoltan.balogh at ericsson.com
Mon Dec 21 16:33:10 UTC 2015
Hi,
When a group is deleted, I would expect that all flows which include a Group action with the ID of the deleted group should be removed.
Currently, only flows in table 0 are removed. For instance:
ovs-vsctl add-br BR0
ovs-ofctl add-group BR0 group_id=01,type=select,bucket=output:2 -OOpenFlow13
ovs-ofctl add-flow BR0 table=1,in_port=1,actions=group:1 -OOpenFlow13
ovs-ofctl add-flow BR0 in_port=2,actions=group:1 -OOpenFlow13
ovs-ofctl add-flow BR0 in_port=3,actions=write_actions\(group:1\) -OOpenFlow13
ovs-ofctl add-flow BR0 table=2,in_port=4,actions=write_actions\(group:1\) -OOpenFlow13
ovs-ofctl dump-flows BR0 -OOpenFlow13
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x0, duration=25.047s, table=0, n_packets=0, n_bytes=0, in_port=2 actions=group:1
cookie=0x0, duration=24.493s, table=0, n_packets=0, n_bytes=0, in_port=3 actions=write_actions(group:1)
cookie=0x0, duration=409.515s, table=0, n_packets=0, n_bytes=0, priority=0 actions=NORMAL
cookie=0x0, duration=53.497s, table=1, n_packets=0, n_bytes=0, in_port=1 actions=group:1
cookie=0x0, duration=10.094s, table=2, n_packets=0, n_bytes=0, in_port=4 actions=write_actions(group:1)
ovs-ofctl dump-groups BR0 -OOpenFlow13
OFPST_GROUP_DESC reply (OF1.3) (xid=0x2):
group_id=1,type=select,bucket=actions=output:2
ovs-ofctl del-groups BR0 group_id=1 -OOpenFlow13
ovs-ofctl dump-flows BR0 -OOpenFlow13
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x0, duration=458.402s, table=0, n_packets=0, n_bytes=0, priority=0 actions=NORMAL
cookie=0x0, duration=102.384s, table=1, n_packets=0, n_bytes=0, in_port=1 actions=group:1
cookie=0x0, duration=58.981s, table=2, n_packets=0, n_bytes=0, in_port=4 actions=write_actions(group:1)
The Open vSwitch version number:
ovs-vswitchd --version
ovs-vswitchd (Open vSwitch) 2.5.90
Compiled Dec 18 2015 04:13:19
The Git commit number:
git rev-parse HEAD
8ab1170b06ddf33dfb06b0346d21f2e4380d8eea
The kernel version:
cat /proc/version
Linux version 3.13.0-73-generic (buildd at lgw01-13) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #116-Ubuntu SMP Fri Dec 4 15:31:30 UTC 2015
The following patch solves the problem. All the affected flows (i.e. flows from table 1 and 2 in the example) are removed.:
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index c5bd949..8c85de5 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -6548,6 +6548,7 @@ delete_group__(struct ofproto *ofproto, struct ofgroup *ofgroup)
flow_mod_init(&ofm.fm, &match, 0, NULL, 0, OFPFC_DELETE);
ofm.fm.delete_reason = OFPRR_GROUP_DELETE;
ofm.fm.out_group = ofgroup->group_id;
+ ofm.fm.table_id = 0xff;
handle_flow_mod__(ofproto, &ofm, NULL);
hmap_remove(&ofproto->groups, &ofgroup->hmap_node);
Best regards,
Zoltan Balogh
More information about the discuss
mailing list