[ovs-dev] [ofp-print 13/18] ofp-print: Print OFPUTIL_NXT_FLOW_REMOVED.
Justin Pettit
jpettit at nicira.com
Thu Dec 9 07:02:49 UTC 2010
On Dec 8, 2010, at 4:27 PM, Ben Pfaff wrote:
> +ofp_print_flow_removed(struct ds *string, const struct ofp_header *oh)
> {
> + struct ofputil_flow_removed fr;
> + int error;
> +
> + error = ofputil_decode_flow_removed(&fr, oh, NXFF_OPENFLOW10);
As with ofputil_decode_flow_mod(), the last argument is a little confusing, since it only applies if the type is OFPUTIL_OFPT_FLOW_REMOVED. I think a clarifying comment in the definition would be useful.
> +/* Converts an OFPT_FLOW_REMOVED or NXT_FLOW_REMOVED message 'oh', received
> + * when the current flow format was 'flow_format', into an abstract
> + * ofputil_flow_removed in 'fr'. Returns 0 if successful, otherwise an
> + * OpenFlow error code. */
> +int
> +ofputil_decode_flow_removed(struct ofputil_flow_removed *fr,
> + const struct ofp_header *oh,
> + enum nx_flow_format flow_format)
> +{
> + const struct ofputil_msg_type *type;
> + int code;
Is there a reason to use "int" instead of "ofputil_msg_code"?
Otherwise, looks good.
--Justin
More information about the dev
mailing list