[ovs-dev] [PATCH] cfm: Clear RDI on new CFM configurations.

Ethan Jackson ethan at nicira.com
Thu Jul 19 06:45:05 UTC 2012


When CFM is first configured, it detects no remote endpoints, and
thus sets RDI on its CCMs.  This can cause the receiver of these
CCMs to think there is a problem when really things are simply
initializing.  This patch fixes the issue by not setting the RDI
bit in CCMs until at least one fault interval has passed.

Bug #12610.
Reported-by: Paul Ingram <paul at nicira.com>
Signed-off-by: Ethan Jackson <ethan at nicira.com>
---
 lib/cfm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/cfm.c b/lib/cfm.c
index 7503ad5..91c557b 100644
--- a/lib/cfm.c
+++ b/lib/cfm.c
@@ -87,6 +87,7 @@ struct cfm {
 
     uint64_t mpid;
     bool extended;         /* Extended mode. */
+    bool booted;           /* A full fault interval has occured. */
     enum cfm_fault_reason fault;  /* Connectivity fault status. */
     enum cfm_fault_reason recv_fault;  /* Bit mask of faults occuring on
                                           receive. */
@@ -404,6 +405,7 @@ cfm_run(struct cfm *cfm)
             ds_destroy(&ds);
         }
 
+        cfm->booted = true;
         timer_set_duration(&cfm->fault_timer, interval);
         VLOG_DBG("%s: new fault interval", cfm->name);
     }
@@ -466,7 +468,7 @@ cfm_compose_ccm(struct cfm *cfm, struct ofpbuf *packet,
         ccm->interval_ms_x = htons(0);
     }
 
-    if (hmap_is_empty(&cfm->remote_mps)) {
+    if (cfm->booted && hmap_is_empty(&cfm->remote_mps)) {
         ccm->flags |= CCM_RDI_MASK;
     }
 
-- 
1.7.11.2




More information about the dev mailing list