On Tue, Mar 05, 2013 at 09:40:18PM -0800, Ben Pfaff wrote: > On Tue, Mar 05, 2013 at 05:02:25PM -0800, Ethan Jackson wrote: > > I think cfm_get_status() deserves a comment in ofproto-provider.h and > > ofproto.c, more out of convention than anything else. > > Oops. I overlooked that. I'll take care of that in the morning and > push this to master. Thanks for the reviews.
I applied this incremental and I'll push it soon: diff --git a/ofproto/ofproto-provider.h b/ofproto/ofproto-provider.h index 3b17a73..d8db3ae 100644 --- a/ofproto/ofproto-provider.h +++ b/ofproto/ofproto-provider.h @@ -1120,6 +1120,13 @@ struct ofproto_class { * support CFM, as does a null pointer. */ int (*set_cfm)(struct ofport *ofport, const struct cfm_settings *s); + /* Checks the status of CFM configured on 'ofport'. Returns true if the + * port's CFM status was successfully stored into '*status'. Returns false + * if the port did not have CFM configured, in which case '*status' is + * indeterminate. + * + * The caller must provide and owns '*status', but it does not own and must + * not modify or free the array returned in 'status->rmps'. */ bool (*get_cfm_status)(const struct ofport *ofport, struct ofproto_cfm_status *status); diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index bf27179..03ca59b 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -2843,6 +2843,13 @@ ofproto_get_netflow_ids(const struct ofproto *ofproto, ofproto->ofproto_class->get_netflow_ids(ofproto, engine_type, engine_id); } +/* Checks the status of CFM configured on 'ofp_port' within 'ofproto'. Returns + * true if the port's CFM status was successfully stored into '*status'. + * Returns false if the port did not have CFM configured, in which case + * '*status' is indeterminate. + * + * The caller must provide and owns '*status', but it does not own and must not + * modify or free the array returned in 'status->rmps'. */ bool ofproto_port_get_cfm_status(const struct ofproto *ofproto, uint16_t ofp_port, struct ofproto_cfm_status *status) _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev