Commit 082e4ebc authored by Zoltán Balogh's avatar Zoltán Balogh Committed by Ben Pfaff

ofproto: Remove flows from all tables upon group deletion.

When a group is deleted, all flows which include a Group action with the ID
of the deleted group should be removed.  Until now, only flows in table 0
were removed.  This fixes the problem.
Signed-off-by: default avatarZoltán Balogh <zoltan.balogh@ericsson.com>
[blp@ovn.org added a test]
Signed-off-by: default avatarBen Pfaff <blp@ovn.org>
parent 00434b59
......@@ -191,6 +191,7 @@ Yasuhito Takamiya yasuhito@gmail.com
yinpeijun yinpeijun@huawei.com
Yu Zhiguo yuzg@cn.fujitsu.com
ZhengLingyun konghuarukhr@163.com
Zoltán Balogh zoltan.balogh@ericsson.com
Zoltan Kiss zoltan.kiss@citrix.com
Zhi Yong Wu zwu.kernel@gmail.com
Zang MingJie zealot0630@gmail.com
......
......@@ -6465,6 +6465,7 @@ delete_group__(struct ofproto *ofproto, struct ofgroup *ofgroup)
flow_mod_init(&fm, &match, 0, NULL, 0, OFPFC_DELETE);
fm.delete_reason = OFPRR_GROUP_DELETE;
fm.out_group = ofgroup->group_id;
fm.table_id = OFPTT_ALL;
handle_flow_mod__(ofproto, &fm, NULL);
hmap_remove(&ofproto->groups, &ofgroup->hmap_node);
......
......@@ -386,25 +386,25 @@ group_id=1235,type=all,bucket=output:10
AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-groups br0 groups.txt])
AT_DATA([flows.txt], [dnl
tcp actions=group:1234
udp actions=group:1235
table=2 udp actions=group:1235
])
AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-flows br0 flows.txt])
AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-flows br0 | ofctl_strip | sort],
[0], [dnl
table=2, udp actions=group:1235
tcp actions=group:1234
udp actions=group:1235
OFPST_FLOW reply (OF1.1):
])
AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn del-groups br0 group_id=1234])
AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-flows br0 | ofctl_strip | sort],
[0], [dnl
udp actions=group:1235
table=2, udp actions=group:1235
OFPST_FLOW reply (OF1.1):
])
AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn del-groups br0 group_id=1234])
AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-flows br0 | ofctl_strip | sort],
[0], [dnl
udp actions=group:1235
table=2, udp actions=group:1235
OFPST_FLOW reply (OF1.1):
])
AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn del-groups br0])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment