#include_next <linux/skbuff.h>
+#include <linux/jhash.h>
#include <linux/version.h>
+#ifndef HAVE_IGNORE_DF_RENAME
+#define ignore_df local_df
+#endif
+
#ifndef HAVE_SKB_COPY_FROM_LINEAR_DATA_OFFSET
static inline void skb_copy_from_linear_data_offset(const struct sk_buff *skb,
const int offset, void *to,
{
#ifdef HAVE_RXHASH
if (skb->rxhash)
+#ifndef HAVE_U16_RXHASH
return skb->rxhash;
+#else
+ return jhash_1word(skb->rxhash, 0);
+#endif
#endif
return __skb_get_hash(skb);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)
unsigned int skb_zerocopy_headlen(const struct sk_buff *from);
+#endif
+
+#ifndef HAVE_SKB_ZEROCOPY
+#define skb_zerocopy rpl_skb_zerocopy
int skb_zerocopy(struct sk_buff *to, struct sk_buff *from, int len,
int hlen);
#endif
#ifndef HAVE_SKB_CLEAR_HASH
static inline void skb_clear_hash(struct sk_buff *skb)
{
-#if HAVE_RXHASH
+#ifdef HAVE_RXHASH
skb->rxhash = 0;
#endif
-#if HAVE_L4_RXHASH
+#ifdef HAVE_L4_RXHASH
skb->l4_rxhash = 0;
#endif
}