kni: fix build on RHEL 8
authorXiao Liang <xiliang@redhat.com>
Wed, 19 Dec 2018 07:07:58 +0000 (15:07 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 14 Jan 2019 13:02:16 +0000 (14:02 +0100)
'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>
kernel/linux/kni/compat.h
kernel/linux/kni/ethtool/igb/kcompat.h

index 5aadebb..bc81d0c 100644 (file)
 #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
 
index ae1b530..2681be6 100644 (file)
@@ -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