From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id E22C2A0AC5 for ; Mon, 27 May 2019 06:06:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 996A19E4; Mon, 27 May 2019 06:06:35 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id C7DD6A3; Mon, 27 May 2019 06:06:33 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 May 2019 21:06:32 -0700 X-ExtLoop1: 1 Received: from nfvihost.sh.intel.com ([10.239.182.124]) by orsmga005.jf.intel.com with ESMTP; 26 May 2019 21:06:32 -0700 From: michael.luo@intel.com To: dev@dpdk.org Cc: stable@dpdk.org Date: Mon, 27 May 2019 12:02:07 +0800 Message-Id: <1558929727-56647-1-git-send-email-michael.luo@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] kni: fix build on 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" From: Luo Gaoliang Build error was seen on RHEL8 when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled. Build error log: /root/kni/dpdk-19.05/kernel/linux/kni/ethtool/igb/kcompat.h:3928:25: error: 'const struct net_device_ops' has no member named 'extended' #define ndo_set_vf_vlan extended.ndo_set_vf_vlan ^~~~~~~~ RHEL8 defined ndo_set_vf_vlan in net_device_ops as well as the mainline kernel. Signed-off-by: Luo Gaoliang --- kernel/linux/kni/ethtool/igb/kcompat.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h index 649a69c..f041a3e 100644 --- a/kernel/linux/kni/ethtool/igb/kcompat.h +++ b/kernel/linux/kni/ethtool/igb/kcompat.h @@ -3922,7 +3922,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) (SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(12, 3, 0)) || \ (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 4))) #define HAVE_VF_VLAN_PROTO -#if (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 4)) +#if ((RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 4)) && \ + (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0))) /* In RHEL/Centos 7.4, the "new" version of ndo_set_vf_vlan * is in the struct net_device_ops_extended */ #define ndo_set_vf_vlan extended.ndo_set_vf_vlan -- 2.7.4