From: David Zeng Date: Fri, 21 Dec 2018 16:27:33 +0000 (+0800) Subject: kni: fix build on RHEL8 for arm and Power9 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3d5501d568aacbcf71832691278f5656d3a9b649;p=dpdk.git kni: fix build on RHEL8 for arm and Power9 Signed-off-by: David Zeng Acked-by: Ferruh Yigit --- diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h index bc81d0c8d9..3c575c70a2 100644 --- a/kernel/linux/kni/compat.h +++ b/kernel/linux/kni/compat.h @@ -102,9 +102,15 @@ #undef NET_NAME_UNKNOWN #endif +/* + * RHEL has two different version with different kernel version: + * 3.10 is for AMD, Intel, IBM POWER7 and POWER8; + * 4.14 is for ARM and IBM POWER9 + */ #if (defined(RHEL_RELEASE_CODE) && \ (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \ - (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0))) + (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)) && \ + (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0))) #define ndo_change_mtu ndo_change_mtu_rh74 #endif diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h index 2681be6846..430aabafe3 100644 --- a/kernel/linux/kni/ethtool/igb/kcompat.h +++ b/kernel/linux/kni/ethtool/igb/kcompat.h @@ -3931,7 +3931,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) #if (defined(RHEL_RELEASE_CODE) && \ (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \ - (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0))) + (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)) && \ + (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0))) #define ndo_change_mtu ndo_change_mtu_rh74 #endif