From: Ben Pfaff Date: Thu, 4 Jun 2009 22:35:35 +0000 (-0700) Subject: vswitch: Make bonded interface up/down detection happen faster. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a58090209a91145f803766dc0b0cc925414c6fb8;p=openvswitch vswitch: Make bonded interface up/down detection happen faster. 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. --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index f0d85180..869efe62 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -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",