bridge: Rate limit default address warnings.
authorEthan Jackson <ethan@nicira.com>
Wed, 11 Apr 2012 01:35:04 +0000 (18:35 -0700)
committerEthan Jackson <ethan@nicira.com>
Wed, 11 Apr 2012 20:01:47 +0000 (13:01 -0700)
This information is typically not more useful if displayed more
often.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
vswitchd/bridge.c

index 3833974f9ff84a3d60e25bb475178a7636bc31e7..e5b546bf4082faa12edd70916e33452cd9736191 100644 (file)
@@ -1405,10 +1405,11 @@ bridge_pick_local_hw_addr(struct bridge *br, uint8_t ea[ETH_ADDR_LEN],
         VLOG_DBG("bridge %s: using bridge Ethernet address "ETH_ADDR_FMT,
                  br->name, ETH_ADDR_ARGS(ea));
     } else {
+        static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 10);
         memcpy(ea, br->default_ea, ETH_ADDR_LEN);
         *hw_addr_iface = NULL;
-        VLOG_WARN("bridge %s: using default bridge Ethernet "
-                  "address "ETH_ADDR_FMT, br->name, ETH_ADDR_ARGS(ea));
+        VLOG_WARN_RL(&rl, "bridge %s: using default bridge Ethernet "
+                     "address "ETH_ADDR_FMT, br->name, ETH_ADDR_ARGS(ea));
     }
 
     hmapx_destroy(&mirror_output_ports);