[ovs-dev] [cfm 3/5] cfm: Reduce missed CCM detection time.

Ethan Jackson ethan at nicira.com
Fri Mar 25 22:55:21 UTC 2011


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 |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/cfm.c b/lib/cfm.c
index 71594e2..f017e73 100644
--- a/lib/cfm.c
+++ b/lib/cfm.c
@@ -191,9 +191,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 * 3.5) {
         bool fault;
         struct remote_mp *rmp, *rmp_next;
         struct remote_maid *rmaid, *rmaid_next;
-- 
1.7.4.1




More information about the dev mailing list