Hi
This path allows to build openvswitch 2.0.9 datapath driver under Proxmox VE 3.2.
How to build
Install openvswitch-datapath-source (latest from pxmx git - 2.0.90-4), then run module-assistant:
This path allows to build openvswitch 2.0.9 datapath driver under Proxmox VE 3.2.
How to build
Install openvswitch-datapath-source (latest from pxmx git - 2.0.90-4), then run module-assistant:
Code:
module-assistant auto-install openvswitch-datapath
Code:
diff --git a/pvepatches/datapath_build.patch b/pvepatches/datapath_build.patch
new file mode 100644
index 0000000..729a526
--- /dev/null
+++ b/pvepatches/datapath_build.patch
@@ -0,0 +1,75 @@
+diff -urN a/acinclude.m4 b/acinclude.m4
+--- a/acinclude.m4 2013-12-18 08:59:19.000000000 +0200
++++ b/acinclude.m4 2014-06-25 08:04:07.000000000 +0300
+@@ -229,6 +229,9 @@
+ OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [__skb_gso_segment])
+ OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [can_checksum_protocol])
+
++ OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [netdev_features_t])
++ OVS_GREP_IFELSE([$KSRC/include/net/net_namespace.h], [pernet_operations])
++
+ OVS_GREP_IFELSE([$KSRC/include/linux/rcupdate.h], [rcu_read_lock_held], [],
+ [OVS_GREP_IFELSE([$KSRC/include/linux/rtnetlink.h],
+ [rcu_read_lock_held])])
+@@ -256,6 +259,8 @@
+ [OVS_DEFINE([HAVE_SKB_WARN_LRO])])
+ OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [consume_skb])
+ OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_frag_page])
++ OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_has_frag_list])
++ OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [__skb_fill_page_desc])
+ OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_reset_mac_len])
+ OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_unclone])
+
+diff -urN a/datapath/linux/compat/include/linux/netdevice.h b/datapath/linux/compat/include/linux/netdevice.h
+--- a/datapath/linux/compat/include/linux/netdevice.h 2013-12-18 08:59:19.000000000 +0200
++++ b/datapath/linux/compat/include/linux/netdevice.h 2014-06-24 15:43:56.000000000 +0300
+@@ -75,7 +75,7 @@
+ }
+ #endif
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
++#ifndef HAVE_NETDEV_FEATURES_T
+ typedef u32 netdev_features_t;
+ #endif
+
+diff -urN a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h
+--- a/datapath/linux/compat/include/linux/skbuff.h 2013-12-18 08:59:19.000000000 +0200
++++ b/datapath/linux/compat/include/linux/skbuff.h 2014-06-24 13:23:44.000000000 +0300
+@@ -265,11 +265,11 @@
+ #endif
+
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
++#ifndef HAVE_SKB_HAS_FRAG_LIST
+ #define skb_has_frag_list skb_has_frags
+ #endif
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0)
++#ifndef HAVE___SKB_FILL_PAGE_DESC
+ static inline void __skb_fill_page_desc(struct sk_buff *skb, int i,
+ struct page *page, int off, int size)
+ {
+diff -urN a/datapath/linux/compat/include/net/net_namespace.h b/datapath/linux/compat/include/net/net_namespace.h
+--- a/datapath/linux/compat/include/net/net_namespace.h 2013-12-18 08:59:19.000000000 +0200
++++ b/datapath/linux/compat/include/net/net_namespace.h 2014-06-25 08:04:43.000000000 +0300
+@@ -3,7 +3,7 @@
+
+ #include_next
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
++#ifndef HAVE_PERNET_OPERATIONS
+ /* for 2.6.32* */
+ struct rpl_pernet_operations {
+ int (*init)(struct net *net);
+diff -urN a/datapath/linux/compat/net_namespace.c b/datapath/linux/compat/net_namespace.c
+--- a/datapath/linux/compat/net_namespace.c 2013-12-18 08:59:19.000000000 +0200
++++ b/datapath/linux/compat/net_namespace.c 2014-06-25 08:05:14.000000000 +0300
+@@ -3,7 +3,7 @@
+ #include
+ #include
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
++#ifndef HAVE_PERNET_OPERATIONS
+
+ int compat_init_net(struct net *net, struct rpl_pernet_operations *pnet)
+ {
diff --git a/pvepatches/series b/pvepatches/series
index df23692..b46f949 100644
--- a/pvepatches/series
+++ b/pvepatches/series
@@ -2,3 +2,4 @@ remove-unneeded-from-control.patch
fix-init-script-patch
fix-init-depends.patch
use-log-cons-for-syslog.patch
+datapath_build.patch
Last edited: