[ovs-dev] [PATCH] odp-netlink.h: Autogenerate a version of odp-netlink for windows kernel.

Ben Pfaff blp at nicira.com
Thu Aug 7 23:40:07 UTC 2014


On Wed, Aug 06, 2014 at 04:30:34PM -0700, Ankur Sharma wrote:
> odp-netlink.h: Autogenerate a version of odp-netlink for windows kernel.
> 
> Autogenerated odp-netlink.h will not compile with windows kernel, as
> it refers to some userspace files like openvswitch/types.h and
> packets.h which hyperv extension does not access. Due to this the
> windows datapath compilation is broken on tip of tree. This patch
> intends to fix that.
> 
> In this patch we add a new sed script "extract-odp-netlink-windows-h" 
> to create odp-netlink-windows-dp.h. It works on similar lines as
> extract-odp-netlink-h, but avoids including the header files
> which are not available for driver.
> 
> Also, added saurabh's fix to not to include some header files
> in lib/netlink-protocol.h not needed by windows driver.
> 
> After this fix, a userspace build will be needed before windows
> kernel datapath can be built.
> 
> Tested that hyperv extension could be built after building
> the userspace. Verified vxlan tunnel based ping across
> hypervisors. Verified that odp-netlink-windows-dp.h is not
> built for linux platform. Ran 'make distcheck' to verify that
> nothing is broken on linux.
> 
> Signed-off-by: Ankur Sharma <ankursharma at vmware.com>
> Co-authored-by: Saurabh Shah <ssaurabh at vmware.com>
> Tested-by: Ankur Sharma <ankursharma at vmware.com>
> Reported-by: Alin Serdean <aserdean at cloudbasesolutions.com>
> Reported-by: Nithin Raju <nithin at vmware.com>
> Reported-at: https://github.com/openvswitch/ovs-issues/issues/21

I think that it would be better to generate the header file in
datapath-windows/include instead of the top-level include directory,
because the generated header is meant for use only from the windows
datapath.

That probably means that the automake.mk code should go inside
datapath-windows/ as well.

I'd be inclined to always build the windows datapath header, not just
"if WIN32".  Building it is cheap, harmless, and could possibly find
bugs.

I think it's probably best to move away from the windows datapath code
trying to include any userspace headers, including netlink-protocol.h.



More information about the dev mailing list