vconn: Paramatise pvconn_open() over minimum OpenFlow version

The motivation for this is to avoid avoids needing to provide a minimu
version parameter to pvconn_accept().  This will in turn avoid the need to
pass version information to connmgr_run() when the range of accetable
OpenFlow versions is made configurable.

Signed-off-by: Simon Horman <horms@verge.net.au>
vconn: Add maximum OpenFlow version

This is in preparation for allowing the range of allowed OpenFlow
versions to be configured.

Signed-off-by: Simon Horman <horms@verge.net.au>
connmgr: Paramatise ofservice_create() over allowed OpenFlow versions

This is in preparation for allowing configuration of the
allowed OpenFlow versions.

Signed-off-by: Simon Horman <horms@verge.net.au>
ofproto: Make set_pvconns() aware of OpenFlow versions

Paramatise the allowed OpenFlow verion for snoops.
This is in preparation for making the allow OpenFlow verions to
be configured.

Signed-off-by: Simon Horman <horms@verge.net.au>
ofp-util: Allow use of OF12 flow format

This enables the use of the OF12 format, the prerequisites of which were
added by "Add OFPUTIL_P_OF12 and NXFF_OPENFLOW12" and patches to fill out
other functions that use OFPUTIL_P_OF12 directly.

Signed-off-by: Simon Horman <horms@verge.net.au>
connmgr: Use version of underlying rconn

Signed-off-by: Simon Horman <horms@verge.net.au>
rconn: Add minimum and maximum OpenFlow versions

Add minimum and maximum OpenFlow versions to struct rconn to allow
reconnect to use these parameters rather than hard-coded defaults.

Signed-off-by: Simon Horman <horms@verge.net.au>
ofproto, connmgr: Parameterise OpenFlow versions for adding controller

Allow minimum and maximum versions to be passed rather
than relying on hard-coded defaults.

Signed-off-by: Simon Horman <horms@verge.net.au>
ofp-util: Add ofputil_protocols_{from,to}_string()

This is preparation for adding minimum and maximum OpenFlow versions as
command-line options for vswitchd and various utilities.

Signed-off-by: Simon Horman <horms@verge.net.au>
util: ovs_print_version(): Show names of OpenFlow versions

For backwards-compatibility also show the OpenFlow versions in hex

Signed-off-by: Simon Horman <horms@verge.net.au>
lib: Add helpers for OpenFlow version command line options

Signed-off-by: Simon Horman <horms@verge.net.au>
ovs-vswitchd: Add options to allow seting of OpenFlow version

--min-ofp-version allows the minimum OpenFlow version to be set.
--max-ofp-version allows the maximum OpenFlow version to be set.
The default for both is OFP10_VERSION which retains the existing
behaviour.

Signed-off-by: Simon Horman <horms@verge.net.au>
ovs-ofctl: Add options to allow seting of OpenFlow version

--min-ofp-version allows the minimum OpenFlow version to be set.
--max-ofp-version allows the maximum OpenFlow version to be set.
The default for both is OFP10_VERSION which retains the existing
behaviour.

Signed-off-by: Simon Horman <horms@verge.net.au>
ovs-controller: Add options to allow seting of OpenFlow version

--min-ofp-version allows the minimum OpenFlow version to be set.
--max-ofp-version allows the maximum OpenFlow version to be set.
The default for both is OFP10_VERSION which retains the existing
behaviour.

Signed-off-by: Simon Horman <horms@verge.net.au>
ovs-ofctl: By default, do not set flow format for OpenFlow 1.1+

Only set the default format for ovs-ofctl monitor if
OpenFlow 1.0 is the prevailing version. IMHO that is
the only case where it makes sense.

Signed-off-by: Simon Horman <horms@verge.net.au>
ofp-util: Open Flow 1.1 and 1.2 flow format capabilities

Open Flow and 1.1 and 1.2 support some of the same
flow format capabilities as NXM.

Signed-off-by: Simon Horman <horms@verge.net.au>
test: vswtichd: Set max-ofp-version OpenFlow12

This allows, for example ovs-ofctl, tests to do likewise

Signed-off-by: Simon Horman <horms@verge.net.au>