From: Ethan Jackson Date: Sat, 5 Feb 2011 02:26:22 +0000 (-0800) Subject: vswitchd: Instrument lacp_update_ifaces(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=750d79a51bec1e9319892ba52b36a9880ba9d8fa;p=openvswitch vswitchd: Instrument lacp_update_ifaces(). --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index cac4e1c1..b4f7a2ef 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -76,6 +76,7 @@ VLOG_DEFINE_THIS_MODULE(bridge); COVERAGE_DEFINE(bridge_flush); COVERAGE_DEFINE(bridge_process_flow); COVERAGE_DEFINE(bridge_reconfigure); +COVERAGE_DEFINE(bridge_lacp_update); enum lacp_status { LACP_STATUS_CURRENT, /* Partner is up to date. */ @@ -3129,13 +3130,17 @@ lacp_update_ifaces(struct port *port) size_t i; struct iface *lead; struct lacp_info lead_pri; + static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 10); port->lacp_need_update = false; + COVERAGE_INC(bridge_lacp_update); if (!port->lacp) { return; } + VLOG_DBG_RL(&rl, "port %s: re-evaluating LACP link status", port->name); + lead = NULL; for (i = 0; i < port->n_ifaces; i++) { struct iface *iface = port->ifaces[i]; @@ -3147,7 +3152,6 @@ lacp_update_ifaces(struct port *port) /* Don't allow loopback interfaces to send traffic or lead. */ if (eth_addr_equals(iface->lacp_partner.sysid, iface->lacp_actor.sysid)) { - static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 10); VLOG_WARN_RL(&rl, "iface %s: Loopback detected. Interface is " "connected to its own bridge", iface->name); iface->lacp_attached = false;