cfm: Reduce missed CCM detection time.
authorEthan Jackson <ethan@nicira.com>
Fri, 25 Mar 2011 21:26:53 +0000 (14:26 -0700)
committerEthan Jackson <ethan@nicira.com>
Mon, 28 Mar 2011 18:32:06 +0000 (11:32 -0700)
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.

lib/cfm.c

index d0f3ee0..ce1269b 100644 (file)
--- 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;