From: Xiao Liang Date: Wed, 19 Dec 2018 07:07:58 +0000 (+0800) Subject: kni: fix build on RHEL 8 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4c820b22c08dea1ff6cd5db8b5a17b6568fcc4a5;p=dpdk.git 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 Acked-by: Ferruh Yigit --- diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h index 5aadebbcd9..bc81d0c8d9 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 ae1b53093e..2681be6846 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