[ovs-dev] [PATCH v3 1/4] ofp-msg: Add helpers for allowing multipart requests

Ben Pfaff blp at nicira.com
Tue Jun 24 15:00:37 UTC 2014


On Mon, Jun 16, 2014 at 11:33:12AM +0900, Simon Horman wrote:
> Add helpers for allowing requests and use them in handle_openflow__().
> 
> This is a in preparation for supporting multipart requests
> on a per message type basis.
> 
> Signed-off-by: Simon Horman <horms at verge.net.au>

> +/* Return if it's a multpart request message
> + * with more parts to follow */
> +bool
> +ofpmsg_is_mp_request(const struct ofp_header *oh)

The comment on this function isn't right.  ofpmsg_is_mp_request() only
checks whether the message is a stats request and whether the version is
one that supports multipart requests.

The name of the function is misleading.  It sounds like it would do the
same thing as ofpmsg_is_stat_request().

The function can be implemented much more succinctly as just:
        return oh->version >= OFP13_VERSION && ofpmsg_is_stat_request(oh);



More information about the dev mailing list