summaryrefslogtreecommitdiff
path: root/ofproto/ofproto-dpif.c
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2011-08-26 14:54:34 -0700
committerEthan Jackson <ethan@nicira.com>2011-09-09 14:11:14 -0700
commit1de11730e612b09e28892880c2845185497a3741 (patch)
tree87e8cb6122e52d7c6b709faefce670ae638d9c68 /ofproto/ofproto-dpif.c
parent348f01e3e36b67f86ac2f9f90c7574d9e1b85d73 (diff)
downloadopenvswitch-1de11730e612b09e28892880c2845185497a3741.tar.gz
cfm: Write remote MPIDs to the database.
A controller may want to know which MPIDs are reachable from an interface configured with CFM. This patch regularly writes this information to the database. Bug #7014.
Diffstat (limited to 'ofproto/ofproto-dpif.c')
-rw-r--r--ofproto/ofproto-dpif.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 9a7132141..5d93153a1 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -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;
+ }
+}
/* 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,