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 2FEB91B3B5 for ; Thu, 7 Feb 2019 14:28:21 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 85286C0CB57B; Thu, 7 Feb 2019 13:28:20 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.33.36.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3BB03600D7; Thu, 7 Feb 2019 13:28:18 +0000 (UTC) From: Kevin Traynor To: Ferruh Yigit Cc: dpdk stable Date: Thu, 7 Feb 2019 13:25:53 +0000 Message-Id: <20190207132614.20538-47-ktraynor@redhat.com> In-Reply-To: <20190207132614.20538-1-ktraynor@redhat.com> References: <20190207132614.20538-1-ktraynor@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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 07 Feb 2019 13:28:20 +0000 (UTC) Subject: [dpdk-stable] patch 'kni: fix build for dev_open in Linux 5.0' has been queued to LTS release 18.11.1 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: , X-List-Received-Date: Thu, 07 Feb 2019 13:28:21 -0000 Hi, FYI, your patch has been queued to LTS release 18.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/14/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Kevin Traynor --- >>From f275bfedd6dccc7320cf659c6f50b7a2010d7965 Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Tue, 22 Jan 2019 15:44:28 +0000 Subject: [PATCH] kni: fix build for dev_open in Linux 5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit d01c18ff821b81baa3b99329ebf051c6a1bfd4ee ] Build error seen with Linux kernel 5.0 and when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled. build error: .../build/build/kernel/linux/kni/ixgbe_ethtool.c:1746:4: error: too few arguments to function ‘dev_open’ dev_open(netdev); ^~~~~~~~ In file included from .../build/kernel/linux/kni/ixgbe_ethtool.c:18: .../linux/linux/include/linux/netdevice.h:2620:5: note: declared here int dev_open(struct net_device *dev, struct netlink_ext_ack *extack); ^~~~~~~~ .../build/build/kernel/linux/kni/igb_ethtool.c:1812:4: error: too few arguments to function ‘dev_open’ dev_open(netdev); ^~~~~~~~ In file included from .../build/build/kernel/linux/kni/igb_ethtool.c:15: .../linux/linux/include/linux/netdevice.h:2620:5: note: declared here int dev_open(struct net_device *dev, struct netlink_ext_ack *extack); ^~~~~~~~ dev_open() is changed in Linux kernel version 5.0 and now requires a new parameter, 'struct netlink_ext_ack *extack'. Fixed by defining dev_open as macro when kernel version >= 5.0 Signed-off-by: Ferruh Yigit --- kernel/linux/kni/ethtool/igb/kcompat.h | 4 ++++ kernel/linux/kni/ethtool/ixgbe/kcompat.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h index 430aabafe..068cfeb52 100644 --- a/kernel/linux/kni/ethtool/igb/kcompat.h +++ b/kernel/linux/kni/ethtool/igb/kcompat.h @@ -3941,4 +3941,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) #endif +#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) ) +#define dev_open(x) dev_open(x, NULL) +#endif /* >= 5.0.0 */ + #if defined(timer_setup) && defined(from_timer) #define HAVE_TIMER_SETUP diff --git a/kernel/linux/kni/ethtool/ixgbe/kcompat.h b/kernel/linux/kni/ethtool/ixgbe/kcompat.h index 7c7d6c317..419fd1f13 100644 --- a/kernel/linux/kni/ethtool/ixgbe/kcompat.h +++ b/kernel/linux/kni/ethtool/ixgbe/kcompat.h @@ -3126,4 +3126,8 @@ static inline int __kc_pci_vfs_assigned(struct pci_dev *dev) #endif /* >= 3.16.0 */ +#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) ) +#define dev_open(x) dev_open(x, NULL) +#endif /* >= 5.0.0 */ + /* * vlan_tx_tag_* macros renamed to skb_vlan_tag_* (Linux commit: df8a39defad4) -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-02-07 13:19:56.645713057 +0000 +++ 0047-kni-fix-build-for-dev_open-in-Linux-5.0.patch 2019-02-07 13:19:55.000000000 +0000 @@ -1,4 +1,4 @@ -From d01c18ff821b81baa3b99329ebf051c6a1bfd4ee Mon Sep 17 00:00:00 2001 +From f275bfedd6dccc7320cf659c6f50b7a2010d7965 Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Tue, 22 Jan 2019 15:44:28 +0000 Subject: [PATCH] kni: fix build for dev_open in Linux 5.0 @@ -6,6 +6,8 @@ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +[ upstream commit d01c18ff821b81baa3b99329ebf051c6a1bfd4ee ] + Build error seen with Linux kernel 5.0 and when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.