datapath: gre: Fix kernel 3.11 compatibility.
[sliver-openvswitch.git] / datapath / linux / compat / gre.c
index 582bd94..f35f11f 100644 (file)
@@ -39,8 +39,6 @@
 
 #include "gso.h"
 
-static struct gre_cisco_protocol __rcu *gre_cisco_proto;
-
 static void gre_csum_fix(struct sk_buff *skb)
 {
        struct gre_base_hdr *greh;
@@ -114,6 +112,8 @@ void gre_build_header(struct sk_buff *skb, const struct tnl_ptk_info *tpi,
        }
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
+
 static __sum16 check_checksum(struct sk_buff *skb)
 {
        __sum16 csum = 0;
@@ -197,6 +197,8 @@ static int parse_gre_header(struct sk_buff *skb, struct tnl_ptk_info *tpi,
        return iptunnel_pull_header(skb, hdr_len, tpi->proto);
 }
 
+static struct gre_cisco_protocol __rcu *gre_cisco_proto;
+
 static int gre_cisco_rcv(struct sk_buff *skb)
 {
        struct tnl_ptk_info tpi;
@@ -354,4 +356,6 @@ int gre_cisco_unregister(struct gre_cisco_protocol *proto)
        return ret;
 }
 
+#endif /* 3.11 */
+
 #endif /* CONFIG_NET_IPGRE_DEMUX */