kni: fix build with Linux 5.1
authorFerruh Yigit <ferruh.yigit@intel.com>
Mon, 8 Apr 2019 14:22:26 +0000 (15:22 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 19 Apr 2019 10:30:46 +0000 (12:30 +0200)
commitdb9178c24c1643b5ef58f2a9ff87c3eef8e0e1e4
tree3fbdab14f38f49c4203a09ce11f1b96fec4c5098
parent261fb941858cfe3df7960fa43976436d71af13a2
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>
kernel/linux/kni/ethtool/igb/igb_main.c
kernel/linux/kni/ethtool/igb/kcompat.h