[ovs-dev] [PATCH 4/5] vswitchd: Instrument lacp_update_ifaces().

Ethan Jackson ethan at nicira.com
Sat Feb 5 02:35:49 UTC 2011


---
 vswitchd/bridge.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 5b8580a..4120184 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;
-- 
1.7.4





More information about the dev mailing list