rxhash has been renamed to hash. In 3.14 and newer, we can use
skb_set_hash().
Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
struct sk_buff *skb)
{
if (netdev_ring(ring)->features & NETIF_F_RXHASH)
- skb->rxhash = le32_to_cpu(rx_desc->wb.lower.hi_dword.rss);
+ skb_set_hash(skb, le32_to_cpu(rx_desc->wb.lower.hi_dword.rss),
+ PKT_HASH_TYPE_L3);
}
#endif
#define HAVE_ENCAP_TSO_OFFLOAD
#endif /* >= 3.10.0 */
+#if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) )
+#ifdef NETIF_F_RXHASH
+#define PKT_HASH_TYPE_L3 0
+static inline void
+skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
+{
+ skb->rxhash = hash;
+}
+#endif /* NETIF_F_RXHASH */
+#endif /* < 3.14.0 */
+
#endif /* _KCOMPAT_H_ */