[ovs-dev] [PATCH 02/18] vconn: Add ofputil_version_bitmap
blp at nicira.com
Tue Oct 23 15:58:15 UTC 2012
On Thu, Oct 18, 2012 at 02:58:02PM +0900, Simon Horman wrote:
> Data structure to store allowed versions as a bitmap.
> Bit offsets correspond to ofp_version numbers which in turn
> correspond to wire-protocol numbers for Open Flow versions..
> E.g. (1 << OFP10_VERSION) is the mask for Open Flow 1.1.
> If the bit for a version is set then it is allowed, otherwise it is
> This is in preparation for allowing the range of allowed OpenFlow
> versions to be configured.
> Signed-off-by: Simon Horman <horms at verge.net.au>
This seems really complicated. A bitmap is fine but I'd suggest using
just a single "unsigned int" or uint32_t instead of a dynamically
allocated data structure. It will take a long time for there to be more
than 32 versions of OpenFlow.
More information about the dev