compat: Backport conntrack strictly to v3.10+.
authorJoe Stringer <joe@ovn.org>
Tue, 15 Dec 2015 19:24:34 +0000 (11:24 -0800)
committerJoe Stringer <joe@ovn.org>
Sat, 19 Dec 2015 01:27:11 +0000 (17:27 -0800)
The conntrack/ipfrag backport was previously not entirely consistent in
its include for versions 3.9 and 3.10. The intention was to build it for
all kernels 3.10 and newer, so fix the version checks.

Reported-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Tested-by: Simon Horman <simon.horman@netronome.com>
datapath/actions.c
datapath/conntrack.c
datapath/conntrack.h

index 9dccf47..6917d51 100644 (file)
@@ -68,7 +68,7 @@ struct ovs_frag_data {
        u8 l2_data[MAX_L2_LEN];
 };
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(3,9,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
 static DEFINE_PER_CPU(struct ovs_frag_data, ovs_frag_data_storage);
 #endif
 
@@ -625,7 +625,7 @@ static int set_sctp(struct sk_buff *skb, struct sw_flow_key *flow_key,
        return 0;
 }
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(3,9,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
 static int ovs_vport_output(OVS_VPORT_OUTPUT_PARAMS)
 {
        struct ovs_frag_data *data = get_pcpu_ptr(ovs_frag_data_storage);
@@ -740,7 +740,7 @@ static void ovs_fragment(struct vport *vport, struct sk_buff *skb, u16 mru,
 err:
        kfree_skb(skb);
 }
-#else /* <= 3.9 */
+#else /* < 3.10 */
 static void ovs_fragment(struct vport *vport, struct sk_buff *skb, u16 mru,
                         __be16 ethertype)
 {
index 13a8043..403d1b4 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/kconfig.h>
 #include <linux/version.h>
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(3,9,0) && \
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) && \
     IS_ENABLED(CONFIG_NF_CONNTRACK)
 
 #include <linux/module.h>
@@ -798,4 +798,4 @@ void ovs_ct_exit(struct net *net)
                nf_connlabels_put(net);
 }
 
-#endif /* CONFIG_NF_CONNTRACK && LINUX > 3.9 */
+#endif /* CONFIG_NF_CONNTRACK && LINUX > 3.10 */
index 340eec6..90b91be 100644 (file)
@@ -20,7 +20,7 @@
 struct ovs_conntrack_info;
 enum ovs_key_attr;
 
-#if IS_ENABLED(CONFIG_NF_CONNTRACK) && LINUX_VERSION_CODE > KERNEL_VERSION(3,9,0)
+#if IS_ENABLED(CONFIG_NF_CONNTRACK) && LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
 void ovs_ct_init(struct net *);
 void ovs_ct_exit(struct net *);
 bool ovs_ct_verify(struct net *, enum ovs_key_attr attr);