From: Hiroshi Shimamoto Date: Thu, 12 Jun 2014 08:09:54 +0000 (+0000) Subject: kni: fix build on RHEL 7 X-Git-Tag: spdx-start~10563 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9998f315d57f0ea24cce0941f073f3aec0219067;p=dpdk.git kni: fix build on RHEL 7 Compilation in RHEL7 is failed. This fixes the build issue. RHEL7 has skb_set_hash, the kernel version is 3.10 though. Don't define skb_set_hash for RHEL7. Signed-off-by: Hiroshi Shimamoto Reviewed-by: Hayato Momma Tested-by: Waterman Cao --- diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h index 2fa8f125b3..de7f81d503 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h @@ -3846,6 +3846,7 @@ static inline struct sk_buff *__kc__vlan_hwaccel_put_tag(struct sk_buff *skb, #endif /* >= 3.10.0 */ #if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) ) +#if (!(RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,0))) #ifdef NETIF_F_RXHASH #define PKT_HASH_TYPE_L3 0 static inline void @@ -3854,6 +3855,7 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) skb->rxhash = hash; } #endif /* NETIF_F_RXHASH */ +#endif /* < RHEL7 */ #endif /* < 3.14.0 */ #endif /* _KCOMPAT_H_ */