ofproto-dpif: Delete MAC learning entries when they expire.
authorBen Pfaff <blp@nicira.com>
Fri, 19 Aug 2011 21:29:27 +0000 (14:29 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 19 Aug 2011 22:08:52 +0000 (15:08 -0700)
Commit fa066f015f716c7 "bridge: Move packet processing functionality into
ofproto" deleted the call to mac_learning_run() that deletes MAC learning
table entries when they expire.  This fixes the problem.

ofproto/ofproto-dpif.c

index 3fd95ea6e162668c9be01eadfda45a25b06c129e..414c82baf5ca75aaf91a4a8d77875a12de123228 100644 (file)
@@ -559,6 +559,8 @@ run(struct ofproto *ofproto_)
         bundle_run(bundle);
     }
 
+    mac_learning_run(ofproto->ml, &ofproto->revalidate_set);
+
     /* Now revalidate if there's anything to do. */
     if (ofproto->need_revalidate
         || !tag_set_is_empty(&ofproto->revalidate_set)) {
@@ -606,6 +608,7 @@ wait(struct ofproto *ofproto_)
     HMAP_FOR_EACH (bundle, hmap_node, &ofproto->bundles) {
         bundle_wait(bundle);
     }
+    mac_learning_wait(ofproto->ml);
     if (ofproto->need_revalidate) {
         /* Shouldn't happen, but if it does just go around again. */
         VLOG_DBG_RL(&rl, "need revalidate in ofproto_wait_cb()");