2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-02 23:35:27 +00:00

ofproto: Use OFPRR_GROUP_DELETE

Use OFPRR_GROUP_DELETE as the reason for deleting flows due
to the removal of a group that they use.

This implementation adds an delete_reason member to struct ofputil_flow_mod
as a convenient way to set the reason used by delete_flows__() when it is
called indirectly from delete_group__().

Signed-off-by: Simon Horman <horms@verge.net.au>
[blp@nicira.com initialized the new member in a few more places]
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Simon Horman
2014-05-30 17:14:14 +09:00
committed by Ben Pfaff
parent e5e4b47cc2
commit cc40d06bf5
7 changed files with 25 additions and 3 deletions

View File

@@ -1596,6 +1596,9 @@ ofputil_decode_flow_mod(struct ofputil_flow_mod *fm,
struct ofpbuf b;
enum ofpraw raw;
/* Ignored for non-delete actions */
fm->delete_reason = OFPRR_DELETE;
ofpbuf_use_const(&b, oh, ntohs(oh->length));
raw = ofpraw_pull_assert(&b);
if (raw == OFPRAW_OFPT11_FLOW_MOD) {