[ovs-dev] [PATCH] cfm: Update the ovsdb when remote maintenance points changed.
Alex Wang
alexw at nicira.com
Sat Mar 15 01:37:45 UTC 2014
The list of remote maintenance points can be used by other daemons
in leader election. This commit makes ovs-vswitchd update the
row of remote maintenance points in ovsdb immediately after it is
changed.
Signed-off-by: Alex Wang <alexw at nicira.com>
---
lib/cfm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/cfm.c b/lib/cfm.c
index 38448ab..a6b60f4 100644
--- a/lib/cfm.c
+++ b/lib/cfm.c
@@ -457,6 +457,7 @@ cfm_run(struct cfm *cfm) OVS_EXCLUDED(mutex)
" %lldms", cfm->name, rmp->mpid,
time_msec() - rmp->last_rx);
if (!demand_override) {
+ seq_change(connectivity_seq_get());
hmap_remove(&cfm->remote_mps, &rmp->node);
free(rmp);
}
@@ -782,6 +783,7 @@ cfm_process_heartbeat(struct cfm *cfm, const struct ofpbuf *p)
if (hmap_count(&cfm->remote_mps) < CFM_MAX_RMPS) {
rmp = xzalloc(sizeof *rmp);
hmap_insert(&cfm->remote_mps, &rmp->node, hash_mpid(ccm_mpid));
+ seq_change(connectivity_seq_get());
} else {
cfm_fault |= CFM_FAULT_OVERFLOW;
VLOG_WARN_RL(&rl,
--
1.7.9.5
More information about the dev
mailing list