[ovs-dev] [ofp-print 13/18] ofp-print: Print OFPUTIL_NXT_FLOW_REMOVED.
Ben Pfaff
blp at nicira.com
Thu Dec 9 18:31:30 UTC 2010
On Wed, Dec 08, 2010 at 11:02:49PM -0800, Justin Pettit wrote:
> 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.
OK, I added a comment.
> > +/* 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"?
No. Fixed.
> Otherwise, looks good.
Thank you for the review.
More information about the dev
mailing list