* [dpdk-stable] [PATCH] kni: fix build for ndo_fdb_add in Linux 5.1
@ 2019-04-08 14:22 Ferruh Yigit
2019-04-08 20:00 ` [dpdk-stable] [dpdk-dev] " Bruce Richardson
0 siblings, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2019-04-08 14:22 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dev, stable
Build error seen with Linux kernel 5.1 and
when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.
Build error:
.../dpdk/build/build/kernel/linux/kni/igb_main.c:2352:18:
error: initialization of ... from incompatible pointer type ...
[-Werror=incompatible-pointer-types]
.ndo_fdb_add = igb_ndo_fdb_add,
^~~~~~~~~~~~~~~
ndo_fdb_add() is changed in Linux kernel version 5.1 and now requires
a new parameter, 'struct netlink_ext_ack *extack':
Linux Commit 87b0984ebfab ("net: Add extack argument to ndo_fdb_add()")
ndo_fdb_add() parameter updated with compile time Linux kernel version
check.
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
kernel/linux/kni/ethtool/igb/igb_main.c | 6 ++++++
kernel/linux/kni/ethtool/igb/kcompat.h | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/kernel/linux/kni/ethtool/igb/igb_main.c b/kernel/linux/kni/ethtool/igb/igb_main.c
index 0b4faeae5..cda2b063d 100644
--- a/kernel/linux/kni/ethtool/igb/igb_main.c
+++ b/kernel/linux/kni/ethtool/igb/igb_main.c
@@ -2112,7 +2112,13 @@ static int igb_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
#ifdef HAVE_NDO_FDB_ADD_VID
u16 vid,
#endif
+#ifdef HAVE_NDO_FDB_ADD_EXTACK
+ u16 flags,
+ struct netlink_ext_ack *extack)
+#else
u16 flags)
+#endif
+
#else
static int igb_ndo_fdb_add(struct ndmsg *ndm,
struct net_device *dev,
diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
index 11b15f3a9..649a69c81 100644
--- a/kernel/linux/kni/ethtool/igb/kcompat.h
+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
@@ -3945,6 +3945,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
#define HAVE_NDO_BRIDGE_SETLINK_EXTACK
#endif /* >= 5.0.0 */
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0) )
+#define HAVE_NDO_FDB_ADD_EXTACK
+#endif /* >= 5.1.0 */
+
#if defined(timer_setup) && defined(from_timer)
#define HAVE_TIMER_SETUP
#endif
--
2.20.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] kni: fix build for ndo_fdb_add in Linux 5.1
2019-04-08 14:22 [dpdk-stable] [PATCH] kni: fix build for ndo_fdb_add in Linux 5.1 Ferruh Yigit
@ 2019-04-08 20:00 ` Bruce Richardson
2019-04-09 17:59 ` Rami Rosen
0 siblings, 1 reply; 4+ messages in thread
From: Bruce Richardson @ 2019-04-08 20:00 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dev, stable
On Mon, Apr 08, 2019 at 03:22:26PM +0100, Ferruh Yigit wrote:
> Build error seen with Linux kernel 5.1 and
> when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.
>
> Build error:
> .../dpdk/build/build/kernel/linux/kni/igb_main.c:2352:18:
> error: initialization of ... from incompatible pointer type ...
> [-Werror=incompatible-pointer-types]
> .ndo_fdb_add = igb_ndo_fdb_add,
> ^~~~~~~~~~~~~~~
>
> ndo_fdb_add() is changed in Linux kernel version 5.1 and now requires
> a new parameter, 'struct netlink_ext_ack *extack':
> Linux Commit 87b0984ebfab ("net: Add extack argument to ndo_fdb_add()")
>
> ndo_fdb_add() parameter updated with compile time Linux kernel version
> check.
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
Thanks, Ferruh.
This allows my builds to start passing again on bleeding-edge kernels.
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] kni: fix build for ndo_fdb_add in Linux 5.1
2019-04-08 20:00 ` [dpdk-stable] [dpdk-dev] " Bruce Richardson
@ 2019-04-09 17:59 ` Rami Rosen
2019-04-19 10:26 ` Thomas Monjalon
0 siblings, 1 reply; 4+ messages in thread
From: Rami Rosen @ 2019-04-09 17:59 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Ferruh Yigit, dev, stable
On Mon, Apr 08, 2019 at 03:22:26PM +0100, Ferruh Yigit wrote:
> Build error seen with Linux kernel 5.1 and
> when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.
>
> Build error:
> .../dpdk/build/build/kernel/linux/kni/igb_main.c:2352:18:
> error: initialization of ... from incompatible pointer type ...
> [-Werror=incompatible-pointer-types]
> .ndo_fdb_add = igb_ndo_fdb_add,
> ^~~~~~~~~~~~~~~
>
> ndo_fdb_add() is changed in Linux kernel version 5.1 and now requires
> a new parameter, 'struct netlink_ext_ack *extack':
> Linux Commit 87b0984ebfab ("net: Add extack argument to ndo_fdb_add()")
>
> ndo_fdb_add() parameter updated with compile time Linux kernel version
> check.
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
Thanks.
Checked build with CONFIG_RTE_KNI_KMOD_ETHTOOL=y
after applying the patch, build was done against the bleeding edge of
net-next of today (kernel 5.1-rc4).
Build of the kni kernel module completed successfully.
Reviewed-by: Rami Rosen <ramirose@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] kni: fix build for ndo_fdb_add in Linux 5.1
2019-04-09 17:59 ` Rami Rosen
@ 2019-04-19 10:26 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2019-04-19 10:26 UTC (permalink / raw)
To: Bruce Richardson; +Cc: stable, Rami Rosen, Ferruh Yigit, dev
09/04/2019 19:59, Rami Rosen:
> On Mon, Apr 08, 2019 at 03:22:26PM +0100, Ferruh Yigit wrote:
> > Build error seen with Linux kernel 5.1 and
> > when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.
> >
> > Build error:
> > .../dpdk/build/build/kernel/linux/kni/igb_main.c:2352:18:
> > error: initialization of ... from incompatible pointer type ...
> > [-Werror=incompatible-pointer-types]
> > .ndo_fdb_add = igb_ndo_fdb_add,
> > ^~~~~~~~~~~~~~~
> >
> > ndo_fdb_add() is changed in Linux kernel version 5.1 and now requires
> > a new parameter, 'struct netlink_ext_ack *extack':
> > Linux Commit 87b0984ebfab ("net: Add extack argument to ndo_fdb_add()")
> >
> > ndo_fdb_add() parameter updated with compile time Linux kernel version
> > check.
> >
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > ---
> Tested-by: Bruce Richardson <bruce.richardson@intel.com>
>
> Thanks.
> Checked build with CONFIG_RTE_KNI_KMOD_ETHTOOL=y
> after applying the patch, build was done against the bleeding edge of
> net-next of today (kernel 5.1-rc4).
> Build of the kni kernel module completed successfully.
>
> Reviewed-by: Rami Rosen <ramirose@gmail.com>
Applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-19 10:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 14:22 [dpdk-stable] [PATCH] kni: fix build for ndo_fdb_add in Linux 5.1 Ferruh Yigit
2019-04-08 20:00 ` [dpdk-stable] [dpdk-dev] " Bruce Richardson
2019-04-09 17:59 ` Rami Rosen
2019-04-19 10:26 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).