cfm: Write remote MPIDs to the database.
[sliver-openvswitch.git] / ofproto / ofproto-dpif.c
index 9a71321..5d93153 100644 (file)
@@ -813,6 +813,20 @@ get_cfm_fault(const struct ofport *ofport_)
 
     return ofport->cfm ? cfm_get_fault(ofport->cfm) : -1;
 }
+
+static int
+get_cfm_remote_mpids(const struct ofport *ofport_, const uint64_t **rmps,
+                     size_t *n_rmps)
+{
+    struct ofport_dpif *ofport = ofport_dpif_cast(ofport_);
+
+    if (ofport->cfm) {
+        cfm_get_remote_mpids(ofport->cfm, rmps, n_rmps);
+        return 0;
+    } else {
+        return -1;
+    }
+}
 \f
 /* Bundles. */
 
@@ -4252,6 +4266,7 @@ const struct ofproto_class ofproto_dpif_class = {
     set_sflow,
     set_cfm,
     get_cfm_fault,
+    get_cfm_remote_mpids,
     bundle_set,
     bundle_remove,
     mirror_set,