ofproto-dpif-mirror: Fix bug that flag "need_revalidate" is never reset.
authorHuanle Han <hanxueluo@gmail.com>
Fri, 5 Feb 2016 23:43:25 +0000 (15:43 -0800)
committerBen Pfaff <blp@ovn.org>
Fri, 5 Feb 2016 23:45:59 +0000 (15:45 -0800)
Flag "need_revalidate" on mbridge is set to true when an ofbundle
destroy. And it's never reset. It causes the backer revalidate and
the mac learning flush every time 'ofproto_run' is called.

Signed-off-by: Huanle Han <hanxueluo@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
ofproto/ofproto-dpif-mirror.c

index f3ff578..6f8079a 100644 (file)
@@ -131,11 +131,13 @@ mbridge_has_mirrors(struct mbridge *mbridge)
 }
 
 /* Returns true if configurations changes in 'mbridge''s mirrors require
- * revalidation. */
+ * revalidation, and resets the revalidation flag to false. */
 bool
 mbridge_need_revalidate(struct mbridge *mbridge)
 {
-    return mbridge->need_revalidate;
+    bool need_revalidate = mbridge->need_revalidate;
+    mbridge->need_revalidate = false;
+    return need_revalidate;
 }
 
 void