From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 58CA8A034E for ; Fri, 5 Jun 2020 20:11:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4D9071D518; Fri, 5 Jun 2020 20:11:47 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id E0D971D518 for ; Fri, 5 Jun 2020 20:11:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591380705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nv3x04ZBzo1mc5sWUKyIDna7lmNq1mP3X6QlPoPPfHs=; b=gArFmNS0ZEuSLQjyPqKlDdYGooQCS8TWYumb2TFbM4dRvqt19E1GHGg5RJIExxlNJ0KtLI 5lU8bfrL+iUcO/4VRPz7oCSfiD93g1wqs4dgCyO8IV5IfmNqc5algCTkmGyrqZpCwlYu5n huxQpytcreDfVgNpzSBvSnCWn+lVpqo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-86-S6-fW_gZOtiAZTbWc5AOEg-1; Fri, 05 Jun 2020 14:11:43 -0400 X-MC-Unique: S6-fW_gZOtiAZTbWc5AOEg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 74EC0106BF7D; Fri, 5 Jun 2020 18:11:42 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6547210013D5; Fri, 5 Jun 2020 18:11:41 +0000 (UTC) From: Kevin Traynor To: stable@dpdk.org, ferruh.yigit@intel.com Cc: bluca@debian.org, Kevin Traynor Date: Fri, 5 Jun 2020 19:11:28 +0100 Message-Id: <20200605181129.14809-2-ktraynor@redhat.com> In-Reply-To: <20200605181129.14809-1-ktraynor@redhat.com> References: <20200605181129.14809-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH 18.11 1/2] kni: fix ethtool dev_open build error X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Build error about dev_open() arguments similar to commit 5c97df1243da ("kni: fix build for dev_open in Linux 5.0") seen when building with RHEL 8.2 and ethtool enabled. kernel/linux/kni/ethtool/ixgbe/ixgbe_ethtool.c: In function ‘ixgbe_diag_test’: kernel/linux/kni/ethtool/ixgbe/ixgbe_ethtool.c:1748:4: error: too few arguments to function ‘dev_open’ dev_open(netdev); ^~~~~~~~ kernel/linux/kni/ethtool/ixgbe/ixgbe_ethtool.c:18: ./include/linux/netdevice.h:2795:5: note: declared here int dev_open(struct net_device *dev, struct netlink_ext_ack *extack); ^~~~~~~~ This is because Linux kernel commit 00f54e68924e ("net: core: dev: Add extack argument to dev_open()") is backported to RHEL/CentOS since 8.1. Extend the fix in commit 5c97df1243da ("kni: fix build for dev_open in Linux 5.0") to cover RHEL/CentOS 8.1 onwards. Signed-off-by: Kevin Traynor --- kernel/linux/kni/ethtool/igb/kcompat.h | 6 ++++-- kernel/linux/kni/ethtool/ixgbe/kcompat.h | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h index 964317508d..adab05aa8a 100644 --- a/kernel/linux/kni/ethtool/igb/kcompat.h +++ b/kernel/linux/kni/ethtool/igb/kcompat.h @@ -3948,8 +3948,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) #endif -#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) ) +#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)) \ + || (defined(RHEL_RELEASE_CODE) \ + && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 1)))) #define dev_open(x) dev_open(x, NULL) #define HAVE_NDO_BRIDGE_SETLINK_EXTACK -#endif /* >= 5.0.0 */ +#endif /* >= 5.0.0 or >= RHEL/CentOS 8.1 */ #if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0) ) diff --git a/kernel/linux/kni/ethtool/ixgbe/kcompat.h b/kernel/linux/kni/ethtool/ixgbe/kcompat.h index e1671e91a9..73e2c3fb96 100644 --- a/kernel/linux/kni/ethtool/ixgbe/kcompat.h +++ b/kernel/linux/kni/ethtool/ixgbe/kcompat.h @@ -3132,7 +3132,9 @@ static inline int __kc_pci_vfs_assigned(struct pci_dev *dev) #endif /* >= 3.16.0 */ -#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) ) +#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)) \ + || (defined(RHEL_RELEASE_CODE) \ + && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 1)))) #define dev_open(x) dev_open(x, NULL) -#endif /* >= 5.0.0 */ +#endif /* >= 5.0.0 or >= RHEL/CentOS 8.1 */ /* -- 2.21.3