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 gst...@mrv.com<mailto:gst...@mrv.com> --- Original issue was discussed here: https://www.mail-archive.com/discuss@openvswitch.org/msg10930.html 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) [E-Banner]<http://www.mrv.com/products/optidriver> The contents of this message, together with any attachments, are intended only for the use of the person(s) to whom they are addressed and may contain confidential and/or privileged information. If you are not the intended recipient, immediately advise the sender, delete this message and any attachments and note that any distribution, or copying of this message, or any attachment, is prohibited. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev