vswitch: Make bonded interface up/down detection happen faster.
authorBen Pfaff <blp@nicira.com>
Thu, 4 Jun 2009 22:35:35 +0000 (15:35 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 4 Jun 2009 22:35:35 +0000 (15:35 -0700)
Our timer calls wait until delay_expires, but our actions only happen
*after* delay_expires, so if there was nothing to wake us up soon
afterward then we could take a while to bring the bonded interface up
or down.

vswitchd/bridge.c

index f0d85180895af9393b8cda20a621621eed3b9d5b..869efe6267cb58d6b944a4f37115612206061908 100644 (file)
@@ -1359,7 +1359,7 @@ bond_run(struct bridge *br)
         }
         for (j = 0; j < port->n_ifaces; j++) {
             struct iface *iface = port->ifaces[j];
-            if (time_msec() > iface->delay_expires) {
+            if (time_msec() >= iface->delay_expires) {
                 iface->delay_expires = LLONG_MAX;
                 iface->enabled = !iface->enabled;
                 VLOG_WARN("interface %s: %s",