summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorFerruh Yigit <ferruh.yigit@intel.com>2019-04-08 15:22:26 +0100
committerThomas Monjalon <thomas@monjalon.net>2019-04-19 12:30:46 +0200
commitdb9178c24c1643b5ef58f2a9ff87c3eef8e0e1e4 (patch)
tree3fbdab14f38f49c4203a09ce11f1b96fec4c5098 /kernel
parent261fb941858cfe3df7960fa43976436d71af13a2 (diff)
downloaddpdk-db9178c24c1643b5ef58f2a9ff87c3eef8e0e1e4.zip
dpdk-db9178c24c1643b5ef58f2a9ff87c3eef8e0e1e4.tar.gz
dpdk-db9178c24c1643b5ef58f2a9ff87c3eef8e0e1e4.tar.xz
kni: fix build with Linux 5.1
Build error seen with Linux kernel 5.1 and when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled. Build error: 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> Reviewed-by: Rami Rosen <ramirose@gmail.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/linux/kni/ethtool/igb/igb_main.c6
-rw-r--r--kernel/linux/kni/ethtool/igb/kcompat.h4
2 files changed, 10 insertions, 0 deletions
diff --git a/kernel/linux/kni/ethtool/igb/igb_main.c b/kernel/linux/kni/ethtool/igb/igb_main.c
index 0b4faea..cda2b06 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 11b15f3..649a69c 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