From 685acfd9ff6679a0c6b4f3a53db6b633cf40472d Mon Sep 17 00:00:00 2001 From: Alex Wang Date: Mon, 9 Jun 2014 18:35:35 -0700 Subject: cfm: Extracts the cfm status in one function. This commit adds a new function, cfm_get_status(), for extracting all cfm status at once. This helps avoid the sequence of lock acquire/release in current implementation of status query. Signed-off-by: Alex Wang Acked-by: Ben Pfaff --- ofproto/ofproto.h | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'ofproto/ofproto.h') diff --git a/ofproto/ofproto.h b/ofproto/ofproto.h index de078b7ba..5f5e6c8ed 100644 --- a/ofproto/ofproto.h +++ b/ofproto/ofproto.h @@ -399,32 +399,9 @@ void ofproto_get_netflow_ids(const struct ofproto *, void ofproto_get_ofproto_controller_info(const struct ofproto *, struct shash *); void ofproto_free_ofproto_controller_info(struct shash *); -/* CFM status query. */ -struct ofproto_cfm_status { - /* 0 if not faulted, otherwise a combination of one or more reasons. */ - enum cfm_fault_reason faults; - - /* 0 if the remote CFM endpoint is operationally down, - * 1 if the remote CFM endpoint is operationally up, - * -1 if we don't know because the remote CFM endpoint is not in extended - * mode. */ - int remote_opstate; - - uint64_t flap_count; - - /* Ordinarily a "health status" in the range 0...100 inclusive, with 0 - * being worst and 100 being best, or -1 if the health status is not - * well-defined. */ - int health; - - /* MPIDs of remote maintenance points whose CCMs have been received. */ - uint64_t *rmps; - size_t n_rmps; -}; - int ofproto_port_get_cfm_status(const struct ofproto *, ofp_port_t ofp_port, - struct ofproto_cfm_status *); + struct cfm_status *); /* Linux VLAN device support (e.g. "eth0.10" for VLAN 10.) * -- cgit v1.2.1