[dpdk-stable] patch 'kni: fix build for dev_open in Linux 5.0' has been queued to LTS release 18.11.1

Kevin Traynor ktraynor at redhat.com
Thu Feb 7 14:25:53 CET 2019


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 <ferruh.yigit at intel.com>
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 <ferruh.yigit at intel.com>
---
 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 <ferruh.yigit at intel.com>
 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.
 


More information about the stable mailing list