1, 2, cfm_unixctl_set_fault, NULL);
}
+/* Records the status change and changes the global connectivity seq. */
+static void
+cfm_status_changed(struct cfm *cfm) OVS_REQUIRES(mutex)
+{
+ seq_change(connectivity_seq_get());
+ cfm->status_changed = true;
+}
+
/* Allocates a 'cfm' object called 'name'. 'cfm' should be initialized by
* cfm_configure() before use. */
struct cfm *
ovs_refcount_init(&cfm->ref_cnt);
ovs_mutex_lock(&mutex);
+ cfm_status_changed(cfm);
cfm_generate_maid(cfm);
hmap_insert(all_cfms, &cfm->hmap_node, hash_string(cfm->name, 0));
ovs_mutex_unlock(&mutex);
}
ovs_mutex_lock(&mutex);
+ cfm_status_changed(cfm);
hmap_remove(all_cfms, &cfm->hmap_node);
ovs_mutex_unlock(&mutex);
return cfm;
}
-/* Records the status change and changes the global connectivity seq. */
-static void
-cfm_status_changed(struct cfm *cfm) OVS_REQUIRES(mutex)
-{
- seq_change(connectivity_seq_get());
- cfm->status_changed = true;
-}
-
/* Should be run periodically to update fault statistics messages. */
void
cfm_run(struct cfm *cfm) OVS_EXCLUDED(mutex)