From patchwork Mon May 27 04:02:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Luo, Michael" X-Patchwork-Id: 53702 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 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 Acked-by: Ferruh Yigit --- 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