summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorDavid Zeng <zengxhsh@cn.ibm.com>2018-12-22 00:27:33 +0800
committerThomas Monjalon <thomas@monjalon.net>2019-01-14 14:33:04 +0100
commit3d5501d568aacbcf71832691278f5656d3a9b649 (patch)
tree8ecaf3ab121363df91580829ec00d4b95ba3e4fa /kernel
parent4c820b22c08dea1ff6cd5db8b5a17b6568fcc4a5 (diff)
downloaddpdk-3d5501d568aacbcf71832691278f5656d3a9b649.zip
dpdk-3d5501d568aacbcf71832691278f5656d3a9b649.tar.gz
dpdk-3d5501d568aacbcf71832691278f5656d3a9b649.tar.xz
kni: fix build on RHEL8 for arm and Power9
Signed-off-by: David Zeng <zengxhsh@cn.ibm.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/linux/kni/compat.h8
-rw-r--r--kernel/linux/kni/ethtool/igb/kcompat.h3
2 files changed, 9 insertions, 2 deletions
diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index bc81d0c..3c575c7 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 2681be6..430aaba 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