* [dpdk-dev] [PATCH] kni: fix build with kernel 3.15
@ 2014-04-14 13:50 Aaro Koskinen
2014-04-17 16:04 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Aaro Koskinen @ 2014-04-14 13:50 UTC (permalink / raw)
To: dev
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>
---
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 3 ++-
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 11 +++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
index 6933626..6388207 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
@@ -7366,7 +7366,8 @@ static inline void igb_rx_hash(struct igb_ring *ring,
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
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
index a404c9f..4b2c940 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
@@ -3831,4 +3831,15 @@ static inline struct sk_buff *__kc__vlan_hwaccel_put_tag(struct sk_buff *skb,
#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_ */
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] kni: fix build with kernel 3.15
2014-04-14 13:50 [dpdk-dev] [PATCH] kni: fix build with kernel 3.15 Aaro Koskinen
@ 2014-04-17 16:04 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2014-04-17 16:04 UTC (permalink / raw)
To: Aaro Koskinen; +Cc: dev
2014-04-14 16:50, Aaro Koskinen:
> 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>
It's applied for version 1.6.0r2.
Thanks
--
Thomas
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-17 16:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-14 13:50 [dpdk-dev] [PATCH] kni: fix build with kernel 3.15 Aaro Koskinen
2014-04-17 16:04 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).