From: Ethan Jackson Date: Fri, 25 Mar 2011 21:26:53 +0000 (-0700) Subject: cfm: Reduce missed CCM detection time. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72c3b44800c5b25d5399b05e1bc6aece44414f49;p=openvswitch cfm: Reduce missed CCM detection time. The specification says that a fault should be signaled when 3.5 * ccm_interval milliseconds have passed. This commit respects that requirement, possibly increasing the responsiveness of fault detection slightly. --- diff --git a/lib/cfm.c b/lib/cfm.c index d0f3ee05..ce1269ba 100644 --- a/lib/cfm.c +++ b/lib/cfm.c @@ -192,9 +192,8 @@ cfm_run(struct cfm *cfm) * MPs at once making this quite a bit simpler. * * According to the specification we should check when (ccm_interval_ms * - * 3.5)ms have passed. We changed the multiplier to 4 to avoid messy - * floating point arithmetic and add a bit of wiggle room. */ - if (now >= cfmi->fault_check + cfmi->ccm_interval_ms * 4) { + * 3.5)ms have passed. */ + if (now >= cfmi->fault_check + (cfmi->ccm_interval_ms * 7) / 2) { bool fault; struct remote_mp *rmp, *rmp_next; struct remote_maid *rmaid, *rmaid_next;