datapath: Add missing #include for skb page accessors.
[cascardo/ovs.git] / datapath / linux / compat / include / linux / skbuff.h
index 79b0b75..a5f8702 100644 (file)
@@ -188,6 +188,8 @@ static inline bool skb_warn_if_lro(const struct sk_buff *skb)
 #endif
 
 #ifndef HAVE_SKB_FRAG_PAGE
+#include <linux/mm.h>
+
 static inline struct page *skb_frag_page(const skb_frag_t *frag)
 {
        return frag->page;
@@ -213,11 +215,14 @@ static inline int skb_unclone(struct sk_buff *skb, gfp_t pri)
 }
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
+#define __skb_get_rxhash rpl__skb_get_rxhash
+#define skb_get_rxhash rpl_skb_get_rxhash
+
 extern u32 __skb_get_rxhash(struct sk_buff *skb);
 static inline __u32 skb_get_rxhash(struct sk_buff *skb)
 {
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,34)
+#ifdef HAVE_RXHASH
        if (skb->rxhash)
                return skb->rxhash;
 #endif
@@ -225,4 +230,10 @@ static inline __u32 skb_get_rxhash(struct sk_buff *skb)
 }
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)
+unsigned int skb_zerocopy_headlen(const struct sk_buff *from);
+void skb_zerocopy(struct sk_buff *to, const struct sk_buff *from, int len, 
+                 int hlen);
+#endif
+
 #endif