forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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-dp-h" to create OvsDpInterface.h. It works on similar lines as extract-odp-netlink-h, but avoids including the header files which are not available for 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 <[email protected]> Co-authored-by: Saurabh Shah <[email protected]> Tested-by: Ankur Sharma <[email protected]> Reported-by: Alin Serdean <[email protected]> Reported-by: Nithin Raju <[email protected]> Reported-at: openvswitch/ovs-issues#21 Signed-off-by: Ben Pfaff <[email protected]>
- Loading branch information
Showing
5 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,3 +60,5 @@ TAGS | |
cscope.* | ||
tags | ||
_debian | ||
odp-netlink.h | ||
OvsDpInterface.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# This is a "sed" script that transforms <linux/openvswitch.h> into a | ||
# form that is suitable for inclusion within the Open vSwitch tree on | ||
# windows system. The transformed header file can be included by windows | ||
# driver modules. | ||
|
||
# Add a header warning that this is a generated file. | ||
1i\ | ||
/* -*- mode: c; buffer-read-only: t -*- */\ | ||
/* Generated automatically from <linux/openvswitch.h> -- do not modify! */\ | ||
\ | ||
\ | ||
|
||
# Avoid using reserved names in header guards. | ||
s/_LINUX_OPENVSWITCH_H/__OVS_DP_INTERFACE_H_/ | ||
|
||
# and use the appropriate userspace header. | ||
s,<linux/types\.h>,"OvsTypes.h", | ||
|
||
# Add ETH_ADDR_LEN macro to avoid including userspace packet.h | ||
s,#include <linux/if_ether\.h>,\n#ifndef ETH_ADDR_LEN \ | ||
#define ETH_ADDR_LEN 6 \n#endif, | ||
|
||
# Use OVS's own ETH_ADDR_LEN instead of Linux-specific ETH_ALEN. | ||
s/ETH_ALEN/ETH_ADDR_LEN/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
BUILT_SOURCES += $(srcdir)/datapath-windows/include/OvsDpInterface.h | ||
|
||
$(srcdir)/datapath-windows/include/OvsDpInterface.h: \ | ||
datapath/linux/compat/include/linux/openvswitch.h \ | ||
build-aux/extract-odp-netlink-windows-dp-h | ||
sed -f $(srcdir)/build-aux/extract-odp-netlink-windows-dp-h < $< > $@ | ||
|
||
EXTRA_DIST += $(srcdir)/build-aux/extract-odp-netlink-windows-dp-h | ||
|
||
CLEANFILES += $(srcdir)/datapath-windows/include/OvsDpInterface.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters