From: Ben Pfaff Date: Mon, 30 Apr 2012 20:01:43 +0000 (-0700) Subject: cfm: Avoid constructing log message that will be dropped by rate-limiting. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56eb405ae4e84d095240f51ea7d93528b5c3a619;p=openvswitch cfm: Avoid constructing log message that will be dropped by rate-limiting. Signed-off-by: Ben Pfaff --- diff --git a/lib/cfm.c b/lib/cfm.c index 66bca75c..38de68f7 100644 --- 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); }