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

Jesse Gross jesse at nicira.com
Sat Dec 11 23:20:37 UTC 2010


On Fri, Dec 10, 2010 at 2:55 PM, Ben Pfaff <blp at nicira.com> wrote:
> 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.

Both of these make sense, I switched to feature tests and merged the
duplicate code.  Thanks.




More information about the dev mailing list