From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id E11EE1B2AE for ; Fri, 21 Dec 2018 17:15:41 +0100 (CET) Received: by mail-pf1-f194.google.com with SMTP id b7so2804145pfi.8 for ; Fri, 21 Dec 2018 08:15:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rfphd4tSd01jXL2hUu7DWXSrFxnjsqv9/a8nl/ULbb0=; b=T83PaC3l2j8xDZbeVhjmgJM1PyHNdnNXWUlnGVrvOaceKQFRHeWjV4M4dGmNxG9YC2 1hOIE66YzNELqk9qOCn1dORFzTrRsnx5VaGDLBkcHPnsb3/Skti0eVg/qfqxFuSe3Msu lAFd4VMrYFIEbrBftACBFAuROaWf/TaKxJNXj3MQaNnxCfeB3Ch7R6gzsUqGuLPGlRTb i4VASPPHD89xIFWh8X2jElkT5wu4mR+Q5mRalKLhxZmsY4V22FsISPzpC5uz9SHy0PoC uLOnZmMUNotQ4YIWz9tmUJgBwpGlMJ76ikB/w71x903nTCVbNis0PwvYjDztjLwnXOXF IEIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rfphd4tSd01jXL2hUu7DWXSrFxnjsqv9/a8nl/ULbb0=; b=W3mtMqQe16+0nj07w/A/Mj3P13Fe+oCQ0c4gv1Cr2WeKKmMhaJQ4CllRXAJZ3ci+SH NAAtdr0acdxtfnYNM9onDB7sfEcLO1H86lV66wF1shwXrdiLHkq48I2BqI79QxmQ4REo sY2ZEXxsiLZDWeksLFUdmf5Njz4mdDYsghdXF5gmF1aTb+U7qyQHS9GUHqnR7PpEInrl ihAhL6ypjYCE+9OlPL+9esvEkQJDzvyyisbD/m+KCl3j5KF80ddCoiQdTaAURgIKWmbf izkKpwobSzlWbzU88hDreBbA7qeWAJ2g+r2TrhOtTLnOLRmvtwhEbhLljMgI6Z9O+t6W Hw+w== X-Gm-Message-State: AJcUukcsmKwoXv4vwyXmGc674cDEV+4Rqjo6i/fcPViQJ6Xmx0N6JHJJ Gn8Kqp+1RZ6OeK3QNjtP+eV1cmWUUvzQWA== X-Google-Smtp-Source: ALg8bN7m0+QdS02J4G/WyFxJ+SyIPpBdWQB67HFY0NmPjdxkCKWC86sl0ndm6YjoXS4vOui0v1UW7g== X-Received: by 2002:a63:34c3:: with SMTP id b186mr2905073pga.184.1545408940893; Fri, 21 Dec 2018 08:15:40 -0800 (PST) Received: from boston-io2.cn.ibm.com ([153.254.110.20]) by smtp.gmail.com with ESMTPSA id 84sm50562144pfa.115.2018.12.21.08.15.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Dec 2018 08:15:40 -0800 (PST) From: David Zeng X-Google-Original-From: David Zeng To: dev@dpdk.org Cc: David Zeng Date: Sat, 22 Dec 2018 00:15:27 +0800 Message-Id: <1545408927-72528-2-git-send-email-zengxhsh@cn.ibm.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1545408927-72528-1-git-send-email-zengxhsh@cn.ibm.com> References: <1545372231-45810-1-git-send-email-zengxhsh@cn.ibm.com> <1545408927-72528-1-git-send-email-zengxhsh@cn.ibm.com> Subject: [dpdk-dev] [PATCH] kni: fix build on RHEL8 and RHEL7.6-ALT X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Dec 2018 16:15:42 -0000 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..3c0c8e3 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