From patchwork Wed Dec 19 07:07:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xiao Liang X-Patchwork-Id: 49104 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B81091BBA1; Wed, 19 Dec 2018 08:08:20 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 99F551BB35 for ; Wed, 19 Dec 2018 08:08:18 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DE23F28123 for ; Wed, 19 Dec 2018 07:08:17 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.66.70.108]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C076C4144; Wed, 19 Dec 2018 07:08:16 +0000 (UTC) From: Xiao Liang To: dev@dpdk.org Cc: xiliang@redhat.com Date: Wed, 19 Dec 2018 15:07:58 +0800 Message-Id: <20181219070759.7538-1-xiliang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 19 Dec 2018 07:08:17 +0000 (UTC) Subject: [dpdk-dev] [PATCH v2] kni:fix build failure as "ndo_change_mtu_rh74" not found in RHEL8 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" '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 ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Xiao Liang Acked-by: Ferruh Yigit --- kernel/linux/kni/compat.h | 3 ++- kernel/linux/kni/ethtool/igb/kcompat.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h index 5aadebbcd..bc81d0c8d 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 ae1b53093..2681be684 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