From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from demumfd002.nsn-inter.net (demumfd002.nsn-inter.net [93.183.12.31]) by dpdk.org (Postfix) with ESMTP id 51A83AE9C for ; Mon, 14 Apr 2014 15:51:54 +0200 (CEST) Received: from demuprx017.emea.nsn-intra.net ([10.150.129.56]) by demumfd002.nsn-inter.net (8.14.3/8.14.3) with ESMTP id s3EDps0X018357 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 14 Apr 2014 13:51:54 GMT Received: from ak-desktop.emea.nsn-net.net ([10.144.45.49]) by demuprx017.emea.nsn-intra.net (8.12.11.20060308/8.12.11) with ESMTP id s3EDprML028668; Mon, 14 Apr 2014 15:51:53 +0200 From: Aaro Koskinen To: dev@dpdk.org Date: Mon, 14 Apr 2014 16:50:00 +0300 Message-Id: <1397483400-29032-1-git-send-email-aaro.koskinen@nsn.com> X-Mailer: git-send-email 1.9.1 X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-size: 1689 X-purgate-ID: 151667::1397483514-00001564-999CB012/0/0 Subject: [dpdk-dev] [PATCH] kni: fix build with kernel 3.15 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 13:51:54 -0000 rxhash has been renamed to hash. In 3.14 and newer, we can use skb_set_hash(). Signed-off-by: Aaro Koskinen --- 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