[ovs-dev] [PATCH] ofproto: flush groups and meters in ofproto_flush__
Gur Stavi
gur.stavi at gmail.com
Wed Oct 1 09:17:46 UTC 2014
In fail-open mode on disconnect from controller rules are flushed. It makes
sense to flush groups and meters as well.
Signed-off-by: Gur Stavi <gur.stavi at gmail.com> <gstavi at mrv.com>
---
Original issue was discussed here:
https://www.mail-archive.com/discuss@openvswitch.org/msg10930.html
Resending to avoid email client auto signature.
Index: ofproto/ofproto.c
===================================================================
--- ofproto/ofproto.c
+++ ofproto/ofproto.c
@@ -1276,6 +1276,8 @@
ovs_mutex_unlock(&ofproto_mutex);
}
+static void delete_group(struct ofproto *ofproto, uint32_t group_id);
+
static void
ofproto_flush__(struct ofproto *ofproto)
OVS_EXCLUDED(ofproto_mutex)
@@ -1305,10 +1307,18 @@
}
}
ovs_mutex_unlock(&ofproto_mutex);
+
+ /* Flush groups */
+ delete_group(ofproto, OFPG_ALL);
+
+ /* Flush meters */
+ ovs_mutex_lock(&ofproto_mutex);
+ if (ofproto->meters) {
+ meter_delete(ofproto, 1, ofproto->meter_features.max_meters);
+ }
+ ovs_mutex_unlock(&ofproto_mutex);
}
-static void delete_group(struct ofproto *ofproto, uint32_t group_id);
-
static void
ofproto_destroy__(struct ofproto *ofproto)
OVS_EXCLUDED(ofproto_mutex)
More information about the dev
mailing list