mirror of
https://github.com/openvswitch/ovs
synced 2025-10-29 15:28:56 +00:00
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: Zoltán Balogh <zoltan.balogh@ericsson.com> [blp@ovn.org added a test] Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
1
AUTHORS
1
AUTHORS
@@ -220,6 +220,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
|
||||
|
||||
@@ -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 = OFPTT_ALL;
|
||||
handle_flow_mod__(ofproto, &ofm, 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])
|
||||
|
||||
Reference in New Issue
Block a user