[dpdk-stable] patch 'kni: fix build for igb_ndo_bridge_setlink in Linux 5.0' has been queued to LTS release 18.11.1
Kevin Traynor
ktraynor at redhat.com
Thu Feb 7 14:25:54 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 0e8edbe360e002847ab1e795b68692e4fa14115a Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at intel.com>
Date: Tue, 22 Jan 2019 15:44:29 +0000
Subject: [PATCH] kni: fix build for igb_ndo_bridge_setlink in Linux 5.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 18cb8293e312bc3bd67211a5a540676f1c667d88 ]
Build error seen with Linux kernel 5.0 and
when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.
build error:
.../build/build/kernel/linux/kni/igb_main.c:2348:24:
error: initialization of
‘int (*)(struct net_device *, struct nlmsghdr *, u16,
struct netlink_ext_ack *)’
{aka ‘int (*)(struct net_device *, struct nlmsghdr *,
short unsigned int, struct netlink_ext_ack *)’}
from incompatible pointer type
‘int (*)(struct net_device *, struct nlmsghdr *, u16)’
{aka ‘int (*)(struct net_device *, struct nlmsghdr *,
short unsigned int)’}
[-Werror=incompatible-pointer-types]
.ndo_bridge_setlink = igb_ndo_bridge_setlink,
^~~~~~~~~~~~~~~~~~~~~~
.../build/build/kernel/linux/kni/igb_main.c:2348:24:
note: (near initialization for ‘igb_netdev_ops.ndo_bridge_setlink’)
igb_ndo_bridge_setlink() is changed in Linux kernel version 5.0
and now requires a new parameter, 'struct netlink_ext_ack *extack'.
Fixed by adding a new parameter with a kernel version check.
Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
kernel/linux/kni/ethtool/igb/igb_main.c | 5 +++++
kernel/linux/kni/ethtool/igb/kcompat.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/kernel/linux/kni/ethtool/igb/igb_main.c b/kernel/linux/kni/ethtool/igb/igb_main.c
index af378d2f2..0b4faeae5 100644
--- a/kernel/linux/kni/ethtool/igb/igb_main.c
+++ b/kernel/linux/kni/ethtool/igb/igb_main.c
@@ -2208,5 +2208,10 @@ static int igb_ndo_fdb_dump(struct sk_buff *skb,
static int igb_ndo_bridge_setlink(struct net_device *dev,
struct nlmsghdr *nlh,
+#ifdef HAVE_NDO_BRIDGE_SETLINK_EXTACK
+ u16 flags, struct netlink_ext_ack *extack)
+#else
u16 flags)
+#endif
+
#else
static int igb_ndo_bridge_setlink(struct net_device *dev,
diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
index 068cfeb52..11b15f3a9 100644
--- a/kernel/linux/kni/ethtool/igb/kcompat.h
+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
@@ -3943,4 +3943,5 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) )
#define dev_open(x) dev_open(x, NULL)
+#define HAVE_NDO_BRIDGE_SETLINK_EXTACK
#endif /* >= 5.0.0 */
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-02-07 13:19:56.676020010 +0000
+++ 0048-kni-fix-build-for-igb_ndo_bridge_setlink-in-Linux-5..patch 2019-02-07 13:19:55.000000000 +0000
@@ -1,4 +1,4 @@
-From 18cb8293e312bc3bd67211a5a540676f1c667d88 Mon Sep 17 00:00:00 2001
+From 0e8edbe360e002847ab1e795b68692e4fa14115a Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at intel.com>
Date: Tue, 22 Jan 2019 15:44:29 +0000
Subject: [PATCH] kni: fix build for igb_ndo_bridge_setlink in Linux 5.0
@@ -6,6 +6,8 @@
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
+[ upstream commit 18cb8293e312bc3bd67211a5a540676f1c667d88 ]
+
Build error seen with Linux kernel 5.0 and
when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.
More information about the stable
mailing list