[ovs-dev] [PATCH 2/8] ofp-util: Flow Dump Protocol for OpenFlow 12

Simon Horman horms at verge.net.au
Tue Nov 20 00:39:56 UTC 2012


On Mon, Nov 19, 2012 at 10:13:22AM -0800, Ben Pfaff wrote:
> On Mon, Nov 19, 2012 at 02:59:29PM +0900, Simon Horman wrote:
> > Allow only OpenFlow 12 as a flow dump protocol for OpenFlow12.
> > Allow OpenFlow10 and NXM as flow dump protocols for other OpenFlow versions.
> > This only changes the behaviour prior to this patch in the case of OpenFlow12
> > which seemed broken as an attempt would be made to set NXM as the
> > flow dump format using an OpenFlow 1.0 message even though an OpenFlow 1.2
> > connection had been negotiated..
> > 
> > Signed-off-by: Simon Horman <horms at verge.net.au>
> 
> I think that this is no longer needed with the changes that I made a few
> patches back.  set_protocol_for_flow_dump() will try to set the protocol
> with try_set_protocol(), which in turn will call
> ofputil_encode_set_protocol(), which in turn will see that the versions
> are incompatible, with:
> 
>     cur_version = ofputil_protocol_to_ofp_version(current);
>     want_version = ofputil_protocol_to_ofp_version(want);
>     if (cur_version != want_version) {
>         *next = current;
>         return NULL;
>     }
> 
> which makes try_set_protocol() return that it failed to set that
> protocol, which makes set_protocol_for_flow_dump() go on to the next
> one.

Hi Ben,

I'm somewhat unsure how you envisage this working.

Without this patch  the code you refer to does indeed see that
all versions are incompatible. But in the end it runs out of options
and produces a fatal error.

$ ovs-ofctl --allowed-ofp-versions OpenFlow12 dump-flows br0
ovs-ofctl: switch does not support any of the usable flow formats (any)

ovs-vswitchd is configured to accept OpenFlow12 and OpenFlow10.

The aim of this patch is to allow the above combination to succeed.



More information about the dev mailing list