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 <[email protected]>
Signed-off-by: Joe Stringer <[email protected]>
---
 datapath/actions.c   | 6 +++---
 datapath/conntrack.c | 4 ++--
 datapath/conntrack.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/datapath/actions.c b/datapath/actions.c
index 9dccf476f379..6917d5169197 100644
--- a/datapath/actions.c
+++ b/datapath/actions.c
@@ -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)
 {
diff --git a/datapath/conntrack.c b/datapath/conntrack.c
index 13a80433ced8..403d1b424074 100644
--- a/datapath/conntrack.c
+++ b/datapath/conntrack.c
@@ -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 */
diff --git a/datapath/conntrack.h b/datapath/conntrack.h
index 340eec621f70..90b91be39fde 100644
--- a/datapath/conntrack.h
+++ b/datapath/conntrack.h
@@ -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);
-- 
2.1.4

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to