[ovs-dev] [PATCH 2/5] datapath: Take advantage of IFF_OVS_DATAPATH.

Ben Pfaff blp at nicira.com
Fri Dec 10 22:55:16 UTC 2010


On Fri, Dec 10, 2010 at 12:42:54PM -0800, Jesse Gross wrote:
> Starting in 2.6.37 we have our own unique identifier to be able
> to find ports attached to OVS.  Take advantage of it to avoid
> ugly workarounds.
> 
> Signed-off-by: Jesse Gross <jesse at nicira.com>

I'd be tempted to use feature tests rather than version tests, e.g.

#if defined(IFF_BRIDGE_PORT) && IFF_BRIDGE_PORT != IFF_OVS_DATAPATH
...2.6.37 version...
#elif defined(IFF_BRIDGE_PORT)
...2.6.36 version...
#else
...old version...
#endif

but I can see why you might prefer your proposal.

The 2.6.36 and 2.6.37 versions are identical except for the test, so I
might consider removing the duplication somehow too.

Acked-by: Ben Pfaff <blp at nicira.com>




More information about the dev mailing list