From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Zeng Subject: [PATCH] kni: fix build on RHEL8 and RHEL7.6-ALT Date: Sat, 22 Dec 2018 00:27:33 +0800 Message-ID: <1545409653-72601-2-git-send-email-zengxhsh@cn.ibm.com> References: <1545408927-72528-2-git-send-email-zengxhsh@cn.ibm.com> <1545409653-72601-1-git-send-email-zengxhsh@cn.ibm.com> Cc: David Zeng To: dev@dpdk.org Return-path: Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 41C851BE67 for ; Fri, 21 Dec 2018 17:28:38 +0100 (CET) Received: by mail-pf1-f196.google.com with SMTP id h3so2838062pfg.1 for ; Fri, 21 Dec 2018 08:28:38 -0800 (PST) In-Reply-To: <1545409653-72601-1-git-send-email-zengxhsh@cn.ibm.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: David Zeng --- kernel/linux/kni/compat.h | 9 ++++++++- kernel/linux/kni/ethtool/igb/kcompat.h | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h index 5aadebb..3c575c7 100644 --- a/kernel/linux/kni/compat.h +++ b/kernel/linux/kni/compat.h @@ -102,8 +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(7, 5)) && \ + (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 ae1b530..430aaba 100644 --- a/kernel/linux/kni/ethtool/igb/kcompat.h +++ b/kernel/linux/kni/ethtool/igb/kcompat.h @@ -3930,7 +3930,9 @@ static inline struct sk_buff *__kc__vlan_hwaccel_put_tag(struct sk_buff *skb, #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)) && \ + (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0))) #define ndo_change_mtu ndo_change_mtu_rh74 #endif -- 1.8.3.1