1 Index: newovs/acinclude.m4
2 ===================================================================
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
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])
11 OVS_GREP_IFELSE([$KSRC/include/linux/random.h], [prandom_u32])
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])
20 OVS_GREP_IFELSE([$KSRC/include/linux/types.h], [bool],
21 [OVS_DEFINE([HAVE_BOOL_TYPE])])
22 Index: newovs/datapath/linux/compat/net_namespace.c
23 ===================================================================
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
27 #include <net/net_namespace.h>
28 #include <net/netns/generic.h>
30 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
31 +#ifndef HAVE_PERNET_OPERATIONS
33 int compat_init_net(struct net *net, struct rpl_pernet_operations *pnet)
35 Index: newovs/datapath/linux/compat/include/net/net_namespace.h
36 ===================================================================
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
41 #include_next <net/net_namespace.h>
43 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
44 +#ifndef HAVE_PERNET_OPERATIONS
46 struct rpl_pernet_operations {
47 int (*init)(struct net *net);
48 Index: newovs/datapath/linux/compat/dev-openvswitch.c
49 ===================================================================
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
54 #endif /* HAVE_DEV_DISABLE_LRO */
56 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) || \
57 - defined HAVE_RHEL_OVS_HOOK
60 static int nr_bridges;
62 Index: newovs/datapath/linux/compat/include/linux/netdevice.h
63 ===================================================================
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
67 extern void dev_disable_lro(struct net_device *dev);
70 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) || \
71 - defined HAVE_RHEL_OVS_HOOK
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;
77 Index: newovs/datapath/vport-netdev.c
78 ===================================================================
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
83 static void netdev_port_receive(struct vport *vport, struct sk_buff *skb);
85 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)
87 /* Called with rcu_read_lock and bottom-halves disabled. */
88 static rx_handler_result_t netdev_frame_hook(struct sk_buff **pskb)
91 /* Returns null if this device is not attached to a datapath. */
92 struct vport *ovs_netdev_get_vport(struct net_device *dev)
94 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) || \
95 - defined HAVE_RHEL_OVS_HOOK
97 #if IFF_OVS_DATAPATH != 0
98 if (likely(dev->priv_flags & IFF_OVS_DATAPATH))
101 #ifdef HAVE_RHEL_OVS_HOOK
102 return (struct vport *)rcu_dereference_rtnl(dev->ax25_ptr);
104 - return (struct vport *)rcu_dereference_rtnl(dev->rx_handler_data);
105 + return (struct vport *)rcu_dereference_rtnl(netdev_extended(dev)->rx_handler_data);
113 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) && \
114 - !defined HAVE_RHEL_OVS_HOOK
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
119 Index: 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
124 #include_next <linux/in.h>
126 #include <linux/module.h>
127 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
129 static inline int proto_ports_offset(int proto)
132 Index: 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
138 #include <linux/version.h>
140 -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)
142 static inline bool ip_is_fragment(const struct iphdr *iph)
144 return (iph->frag_off & htons(IP_MF | IP_OFFSET)) != 0;