diff options
author | Mehak Mahajan <mmahajan@nicira.com> | 2012-03-29 14:34:51 -0700 |
---|---|---|
committer | Mehak Mahajan <mmahajan@nicira.com> | 2012-04-05 13:34:47 -0700 |
commit | c75b7e39d973cc9f4869c84d48eeb3b66afb2971 (patch) | |
tree | 7a373544ffffba4b8786c90bd7652977296e31e1 /vswitchd | |
parent | 7dc05f69efcc3bfc29b8cf5ac74567a940a53c1c (diff) |
Granular link health statistics for cfm.
The changes display the cfm_health of an interface. The cfm_health
is an exponential weighted moving average of the health of all
remote_mpids. The value can vary from 0 to 100, 100 being very healthy
and 0 being unhealthy.
Feature #10363
Requested-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
Diffstat (limited to 'vswitchd')
-rw-r--r-- | vswitchd/bridge.c | 11 | ||||
-rw-r--r-- | vswitchd/vswitch.ovsschema | 9 | ||||
-rw-r--r-- | vswitchd/vswitch.xml | 21 |
3 files changed, 39 insertions, 2 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index adc3b47c..cf1d279b 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -279,6 +279,7 @@ bridge_init(const char *remote) ovsdb_idl_omit_alert(idl, &ovsrec_interface_col_cfm_fault); ovsdb_idl_omit_alert(idl, &ovsrec_interface_col_cfm_fault_status); ovsdb_idl_omit_alert(idl, &ovsrec_interface_col_cfm_remote_mpids); + ovsdb_idl_omit_alert(idl, &ovsrec_interface_set_cfm_health); ovsdb_idl_omit_alert(idl, &ovsrec_interface_col_lacp_current); ovsdb_idl_omit(idl, &ovsrec_interface_col_external_ids); @@ -1547,6 +1548,7 @@ iface_refresh_cfm_stats(struct iface *iface) int fault, error; const uint64_t *rmps; size_t n_rmps; + int health; if (iface_is_synthetic(iface)) { return; @@ -1582,6 +1584,15 @@ iface_refresh_cfm_stats(struct iface *iface) } else { ovsrec_interface_set_cfm_remote_mpids(cfg, NULL, 0); } + + health = ofproto_port_get_cfm_health(iface->port->bridge->ofproto, + iface->ofp_port); + if (health >= 0) { + int64_t cfm_health = health; + ovsrec_interface_set_cfm_health(cfg, &cfm_health, 1); + } else { + ovsrec_interface_set_cfm_health(cfg, NULL, 0); + } } static void diff --git a/vswitchd/vswitch.ovsschema b/vswitchd/vswitch.ovsschema index a3847e77..c7e1ac9e 100644 --- a/vswitchd/vswitch.ovsschema +++ b/vswitchd/vswitch.ovsschema @@ -1,6 +1,6 @@ {"name": "Open_vSwitch", - "version": "6.8.0", - "cksum": "4106006492 16485", + "version": "6.9.0", + "cksum": "617116616 16682", "tables": { "Open_vSwitch": { "columns": { @@ -197,6 +197,11 @@ "ephemeral": true}, "cfm_fault_status": { "type": {"key": "string", "min": 0, "max": "unlimited"}}, + "cfm_health": { + "type": {"key": {"type": "integer", + "minInteger": 0, + "maxInteger": 100}, + "min": 0, "max": 1}}, "lacp_current": { "type": {"key": {"type": "boolean"}, "min": 0, "max": 1}, diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index f3ea3387..03c8539d 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -1726,6 +1726,27 @@ an <code>ovs-appctl</code> command. </column> + <column name="cfm_health"> + <p> + Indicates the health of the interface as a percentage of CCM frames + received over 21 <ref column="other_config" key="cfm_interval"/>s. + The health of an interface is undefined if it is communicating with + more than one <ref column="cfm_remote_mpids"/>. It reduces if + healthy heartbeats are not received at the expected rate, and + gradually improves as healthy heartbeats are received at the desired + rate. Every 21 <ref column="other_config" key="cfm_interval"/>s, the + health of the interface is refreshed. + </p> + <p> + As mentioned above, the faults can be triggered for several reasons. + The link health will deteriorate even if heartbeats are received but + they are reported to be unhealthy. An unhealthy heartbeat in this + context is a heartbeat for which either some fault is set or is out + of sequence. The interface health can be 100 only on receiving + healthy heartbeats at the desired rate. + </p> + </column> + <column name="cfm_remote_mpids"> When CFM is properly configured, Open vSwitch will occasionally receive CCM broadcasts. These broadcasts contain the MPID of the |