cfm: Avoid constructing log message that will be dropped by rate-limiting.
authorBen Pfaff <blp@nicira.com>
Mon, 30 Apr 2012 20:01:43 +0000 (13:01 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 30 Apr 2012 20:02:00 +0000 (13:02 -0700)
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/cfm.c

index 66bca75c67d58361fe7e65b1fd73c2f3f27ee942..38de68f79ce0d94aecb3a1bbda04daa7335b48c1 100644 (file)
--- a/lib/cfm.c
+++ b/lib/cfm.c
@@ -394,12 +394,12 @@ cfm_run(struct cfm *cfm)
             cfm->fault |= CFM_FAULT_RECV;
         }
 
-        if (old_cfm_fault != cfm->fault) {
+        if (old_cfm_fault != cfm->fault && !VLOG_DROP_INFO(&rl)) {
             struct ds ds = DS_EMPTY_INITIALIZER;
 
             ds_put_cfm_fault(&ds, old_cfm_fault, cfm->fault);
-            VLOG_INFO_RL(&rl, "%s: CFM fault status changed:%s", cfm->name,
-                         ds_cstr_ro(&ds));
+            VLOG_INFO("%s: CFM fault status changed:%s", cfm->name,
+                      ds_cstr_ro(&ds));
             ds_destroy(&ds);
         }