[ovs-dev] [PATCH 06/38] ofp-util: Prepare Flow Statistics Request Decoder for other Open Flow versions

Simon Horman horms at verge.net.au
Tue Aug 21 01:35:28 UTC 2012


On Fri, Aug 10, 2012 at 09:42:10AM -0700, Ben Pfaff wrote:
> On Thu, Aug 09, 2012 at 05:49:27PM +0900, Simon Horman wrote:
> > Signed-off-by: Simon Horman <horms at verge.net.au>
> 
> This patch is really quite odd.  Before and after this patch, the
> top-level function ofputil_decode_flow_stats_request() determines the
> raw type and pulls off the OpenFlow header.  But after this patch, the
> function ofputil_decode_ofpst_flow_request() does all that work over
> again.  I think that you did cut-and-paste from
> ofputil_decode_flow_stats_reply() into
> ofputil_decode_ofpst_flow_request(), even though the situations are
> different (a flow stats reply might have several flow stats
> back-to-back, but a flow stats request has exactly one stats request).

My reasoning is that ofputil_decode_flow_stats_request() differentiates
between OFP and NX requests while ofputil_decode_ofpst_flow_request() (is
changed by a later patch so that it) differentiates between requests of
different OF versions.

I do, however, see that this involves some duplication of checking of
the value of raw and will change things around so that.

a) ofputil_decode_ofpst_flow_request is renamed
   ofputil_decode_ofpst_flow_request10() and otherwise unchanged from
   its current incarnation in the master brnach.
b) I will add ofputil_decode_ofpst_flow_request11() and call it
   from ofputil_decode_flow_stats_request()
c) ofputil_decode_nxst_flow_request() will remain unchanged



More information about the dev mailing list