summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorXiao Liang <xiliang@redhat.com>2018-12-19 15:07:58 +0800
committerThomas Monjalon <thomas@monjalon.net>2019-01-14 14:02:16 +0100
commit4c820b22c08dea1ff6cd5db8b5a17b6568fcc4a5 (patch)
tree730a3cb48eff1e1b2421f99754260293695e06cd /kernel
parentbca59f1a08aca1ca9d64925599adbbda4cdb93fc (diff)
downloaddpdk-4c820b22c08dea1ff6cd5db8b5a17b6568fcc4a5.zip
dpdk-4c820b22c08dea1ff6cd5db8b5a17b6568fcc4a5.tar.gz
dpdk-4c820b22c08dea1ff6cd5db8b5a17b6568fcc4a5.tar.xz
kni: fix build on RHEL 8
'ndo_change_mtu_rh74' was changed to 'ndo_change_mtu' in RHEL8. Build error log: /home/dpdk-18.11/kernel/linux/kni/compat.h:107:24: error: ‘const struct net_device_ops’ has no member named ‘ndo_change_mtu_rh74’; did you mean ‘ndo_change_mtu’? #define ndo_change_mtu ndo_change_mtu_rh74 ^~~~~~~~~~~~~~~~~~~ Cc: stable@dpdk.org Signed-off-by: Xiao Liang <xiliang@redhat.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/linux/kni/compat.h3
-rw-r--r--kernel/linux/kni/ethtool/igb/kcompat.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index 5aadebb..bc81d0c 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -103,7 +103,8 @@
#endif
#if (defined(RHEL_RELEASE_CODE) && \
- (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)))
+ (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
+ (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 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 ae1b530..2681be6 100644
--- a/kernel/linux/kni/ethtool/igb/kcompat.h
+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
@@ -3930,7 +3930,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
#endif
#if (defined(RHEL_RELEASE_CODE) && \
- (RHEL_RELEASE_VERSION(7, 5) <= RHEL_RELEASE_CODE))
+ (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
+ (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
#define ndo_change_mtu ndo_change_mtu_rh74
#endif