From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id ABE531BBFC for ; Wed, 19 Dec 2018 08:08:31 +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 1373180E7B for ; Wed, 19 Dec 2018 07:08:31 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.66.70.108]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E97195DD64; Wed, 19 Dec 2018 07:08:29 +0000 (UTC) From: Xiao Liang To: dev@dpdk.org Cc: xiliang@redhat.com Date: Wed, 19 Dec 2018 15:07:59 +0800 Message-Id: <20181219070759.7538-2-xiliang@redhat.com> In-Reply-To: <20181219070759.7538-1-xiliang@redhat.com> References: <20181219070759.7538-1-xiliang@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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.25]); Wed, 19 Dec 2018 07:08:31 +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: , X-List-Received-Date: Wed, 19 Dec 2018 07:08:31 -0000 '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 --- 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 -- 2.17.2