[dpdk-dev] [PATCH] kni: compatibility with RHEL 7

Cao, Waterman waterman.cao at intel.com
Thu Jun 12 11:18:06 CEST 2014


Hi Shimamoto,

  Can you give details about Linux Kernel version and complier version?
  Because we tried to build code in the Redhat 7.0 before, but we don't meet this issue.
  Please see information as the following:
  Linux kernel 3.10.0-54.0.1.el7.x86_64
  RHEL70BETA_64	GCC 4.8.2  ICC: 14.0.0

Thanks

Waterman 
 
-----Original Message-----
>From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Hiroshi Shimamoto
>Sent: Thursday, June 12, 2014 4:10 PM
>To: dev at dpdk.org
>Cc: Hayato Momma
>Subject: [dpdk-dev] [PATCH] kni: compatibility with RHEL 7
>
>From: Hiroshi Shimamoto <h-shimamoto at ct.jp.nec.com>
>
>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 <h-shimamoto at ct.jp.nec.com>
>Reviewed-by: Hayato Momma <h-momma at ce.jp.nec.com>
>---
> lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
>diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
>index 4c27d5d..b4de6e2 100644
>--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
>+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
>@@ -3843,6 +3843,9 @@ 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
>@@ -3851,6 +3854,8 @@ 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_ */
>--
>1.9.1
>


More information about the dev mailing list