]> git.proxmox.com Git - pve-kernel-2.6.32.git/blame - ovspatches/ovs-compile.patch
adopt OVS patches for new kernel (fix compile errors)
[pve-kernel-2.6.32.git] / ovspatches / ovs-compile.patch
CommitLineData
221aa9c7 1Index: newovs/acinclude.m4
f3df0a51 2===================================================================
221aa9c7
DM
3--- newovs.orig/acinclude.m4 2015-06-18 21:32:47.000000000 +0200
4+++ newovs/acinclude.m4 2015-10-27 12:02:53.000000000 +0100
af5b112c 5@@ -291,6 +291,7 @@
f3df0a51
DM
6 OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [can_checksum_protocol])
7 OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [netdev_features_t])
8 OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [pcpu_sw_netstats])
9+ OVS_GREP_IFELSE([$KSRC/include/net/net_namespace.h], [pernet_operations])
10
11 OVS_GREP_IFELSE([$KSRC/include/linux/random.h], [prandom_u32])
12
2cf18d64
DM
13@@ -333,7 +334,7 @@
14 OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_clear_hash])
15 OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [int.skb_zerocopy(],
16 [OVS_DEFINE([HAVE_SKB_ZEROCOPY])])
17- OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [l4_rxhash])
18+ #OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [l4_rxhash])
19
20 OVS_GREP_IFELSE([$KSRC/include/linux/types.h], [bool],
21 [OVS_DEFINE([HAVE_BOOL_TYPE])])
221aa9c7 22Index: newovs/datapath/linux/compat/net_namespace.c
f3df0a51 23===================================================================
221aa9c7
DM
24--- newovs.orig/datapath/linux/compat/net_namespace.c 2015-06-18 21:32:47.000000000 +0200
25+++ newovs/datapath/linux/compat/net_namespace.c 2015-10-27 12:02:53.000000000 +0100
f3df0a51
DM
26@@ -3,7 +3,7 @@
27 #include <net/net_namespace.h>
28 #include <net/netns/generic.h>
29
30-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
31+#ifndef HAVE_PERNET_OPERATIONS
32
33 int compat_init_net(struct net *net, struct rpl_pernet_operations *pnet)
34 {
221aa9c7 35Index: newovs/datapath/linux/compat/include/net/net_namespace.h
f3df0a51 36===================================================================
221aa9c7
DM
37--- newovs.orig/datapath/linux/compat/include/net/net_namespace.h 2015-06-18 21:32:47.000000000 +0200
38+++ newovs/datapath/linux/compat/include/net/net_namespace.h 2015-10-27 12:02:53.000000000 +0100
f3df0a51
DM
39@@ -3,7 +3,7 @@
40
41 #include_next <net/net_namespace.h>
42
43-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
44+#ifndef HAVE_PERNET_OPERATIONS
45 /* for 2.6.32* */
46 struct rpl_pernet_operations {
47 int (*init)(struct net *net);
221aa9c7 48Index: newovs/datapath/linux/compat/dev-openvswitch.c
2cf18d64 49===================================================================
221aa9c7
DM
50--- newovs.orig/datapath/linux/compat/dev-openvswitch.c 2015-06-18 21:32:47.000000000 +0200
51+++ newovs/datapath/linux/compat/dev-openvswitch.c 2015-10-27 12:02:53.000000000 +0100
2cf18d64
DM
52@@ -33,8 +33,7 @@
53
54 #endif /* HAVE_DEV_DISABLE_LRO */
55
56-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) || \
57- defined HAVE_RHEL_OVS_HOOK
58+#if 0
59
60 static int nr_bridges;
61
221aa9c7 62Index: newovs/datapath/linux/compat/include/linux/netdevice.h
2cf18d64 63===================================================================
221aa9c7
DM
64--- newovs.orig/datapath/linux/compat/include/linux/netdevice.h 2015-06-18 21:32:47.000000000 +0200
65+++ newovs/datapath/linux/compat/include/linux/netdevice.h 2015-10-27 12:02:53.000000000 +0100
2cf18d64
DM
66@@ -22,9 +22,7 @@
67 extern void dev_disable_lro(struct net_device *dev);
68 #endif
69
70-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) || \
71- defined HAVE_RHEL_OVS_HOOK
72-
73+#if 0
74 #ifdef HAVE_RHEL_OVS_HOOK
75 typedef struct sk_buff *(openvswitch_handle_frame_hook_t)(struct sk_buff *skb);
76 extern openvswitch_handle_frame_hook_t *openvswitch_handle_frame_hook;
221aa9c7 77Index: newovs/datapath/vport-netdev.c
2cf18d64 78===================================================================
221aa9c7
DM
79--- newovs.orig/datapath/vport-netdev.c 2015-06-18 21:32:47.000000000 +0200
80+++ newovs/datapath/vport-netdev.c 2015-10-27 12:02:53.000000000 +0100
2cf18d64
DM
81@@ -36,7 +36,7 @@
82
83 static void netdev_port_receive(struct vport *vport, struct sk_buff *skb);
84
85-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)
86+#if 1
87 /* Called with rcu_read_lock and bottom-halves disabled. */
88 static rx_handler_result_t netdev_frame_hook(struct sk_buff **pskb)
89 {
18f1e9f6
DM
90@@ -253,8 +253,7 @@
91 /* Returns null if this device is not attached to a datapath. */
92 struct vport *ovs_netdev_get_vport(struct net_device *dev)
93 {
94-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) || \
95- defined HAVE_RHEL_OVS_HOOK
96+#if 1
97 #if IFF_OVS_DATAPATH != 0
98 if (likely(dev->priv_flags & IFF_OVS_DATAPATH))
99 #else
100@@ -263,7 +262,7 @@
101 #ifdef HAVE_RHEL_OVS_HOOK
102 return (struct vport *)rcu_dereference_rtnl(dev->ax25_ptr);
103 #else
104- return (struct vport *)rcu_dereference_rtnl(dev->rx_handler_data);
105+ return (struct vport *)rcu_dereference_rtnl(netdev_extended(dev)->rx_handler_data);
106 #endif
107 else
108 return NULL;
109@@ -280,8 +279,7 @@
b93cf8d3
DM
110 .send = netdev_send,
111 };
112
113-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) && \
114- !defined HAVE_RHEL_OVS_HOOK
115+#if 0
116 /*
117 * Enforces, mutual exclusion with the Linux bridge module, by declaring and
118 * exporting br_should_route_hook. Because the bridge module also exports the
221aa9c7
DM
119Index: newovs/datapath/linux/compat/include/linux/in.h
120===================================================================
121--- newovs.orig/datapath/linux/compat/include/linux/in.h 2015-04-05 01:58:22.000000000 +0200
122+++ newovs/datapath/linux/compat/include/linux/in.h 2015-10-27 12:04:12.000000000 +0100
123@@ -4,7 +4,7 @@
124 #include_next <linux/in.h>
125
126 #include <linux/module.h>
127-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
128+#if 0
129 static inline int proto_ports_offset(int proto)
130 {
131 switch (proto) {
132Index: newovs/datapath/linux/compat/include/net/ip.h
133===================================================================
134--- newovs.orig/datapath/linux/compat/include/net/ip.h 2015-06-18 21:32:47.000000000 +0200
135+++ newovs/datapath/linux/compat/include/net/ip.h 2015-10-27 12:04:53.000000000 +0100
136@@ -5,7 +5,7 @@
137
138 #include <linux/version.h>
139
140-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)
141+#if 0
142 static inline bool ip_is_fragment(const struct iphdr *iph)
143 {
144 return (iph->frag_off & htons(IP_MF | IP_OFFSET)) != 0;