From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id D8270A3 for ; Fri, 8 Mar 2019 18:49:42 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 8 Mar 2019 19:49:37 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x28HloBK002625; Fri, 8 Mar 2019 19:49:36 +0200 From: Yongseok Koh To: Ferruh Yigit Cc: dpdk stable Date: Fri, 8 Mar 2019 09:47:42 -0800 Message-Id: <20190308174749.30771-64-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190308174749.30771-1-yskoh@mellanox.com> References: <20190308174749.30771-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'kni: fix build for dev_open in Linux 5.0' has been queued to LTS release 17.11.6 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: Fri, 08 Mar 2019 17:49:43 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objection by 03/13/19. So please shout if anyone has objection. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Yongseok --- >>From cc766a206625f370605d445dc4fa7d8244d2329a 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 --- lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 4 ++++ lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h index 60be8860d..4c6a3c360 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h @@ -3955,6 +3955,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) #define HAVE_PCI_ENABLE_MSIX #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 #endif diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h index f62a7b56e..19c504fc9 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h @@ -3140,6 +3140,10 @@ static inline int __kc_pci_vfs_assigned(struct pci_dev *dev) #define SET_ETHTOOL_OPS(netdev, ops) ((netdev)->ethtool_ops = (ops)) #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) * For older kernels backported this commit, need to use renamed functions. -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-03-08 09:46:43.325504237 -0800 +++ 0064-kni-fix-build-for-dev_open-in-Linux-5.0.patch 2019-03-08 09:46:40.350403000 -0800 @@ -1,4 +1,4 @@ -From d01c18ff821b81baa3b99329ebf051c6a1bfd4ee Mon Sep 17 00:00:00 2001 +From cc766a206625f370605d445dc4fa7d8244d2329a 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. @@ -34,15 +36,15 @@ Signed-off-by: Ferruh Yigit --- - kernel/linux/kni/ethtool/igb/kcompat.h | 4 ++++ - kernel/linux/kni/ethtool/ixgbe/kcompat.h | 4 ++++ + lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 4 ++++ + lib/librte_eal/linuxapp/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 -@@ -3940,6 +3940,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) +diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +index 60be8860d..4c6a3c360 100644 +--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h ++++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +@@ -3955,6 +3955,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) #define HAVE_PCI_ENABLE_MSIX #endif @@ -53,11 +55,11 @@ #if defined(timer_setup) && defined(from_timer) #define HAVE_TIMER_SETUP #endif -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 -@@ -3125,6 +3125,10 @@ static inline int __kc_pci_vfs_assigned(struct pci_dev *dev) +diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h +index f62a7b56e..19c504fc9 100644 +--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h ++++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h +@@ -3140,6 +3140,10 @@ static inline int __kc_pci_vfs_assigned(struct pci_dev *dev) #define SET_ETHTOOL_OPS(netdev, ops) ((netdev)->ethtool_ops = (ops)) #endif /* >= 3.16.0 */