kni: fix build on CentOS 7.4
authorDan Gora <dg@adax.com>
Tue, 22 May 2018 18:10:08 +0000 (15:10 -0300)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 22 May 2018 20:28:48 +0000 (22:28 +0200)
commit4005ad2556c4ad988d93cd1a1fa4815677e00714
tree28663dac8db7b0edee1bbf4e3cf31a292e0631f3
parent811a76c903293bef6ef1bba587aba32af8192f5d
kni: fix build on CentOS 7.4

Fix compilation errors on Centos 7.4 when CONFIG_RTE_KNI_KMOD_ETHTOOL
is set to 'y'.

Centos 7.4 needs HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK_VLAN_FILL:

igb_main.c: In function ‘igb_ndo_bridge_getlink’:
igb_main.c:2289:2: error: too few arguments to function
                   ‘ndo_dflt_bridge_getlink’
  return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0, nlflags);
  ^

Centos 7.4 needs HAVE_VF_VLAN_PROTO and needs to redefine
ndo_set_vf_vlan to .extended.ndo_set_vf_vlan:

igb_main.c:2318:2: error: unknown field ‘ndo_set_vf_vlan’ specified
                   in initializer
  .ndo_set_vf_vlan = igb_ndo_set_vf_vlan,
  ^

Signed-off-by: Dan Gora <dg@adax.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
kernel/linux/kni/ethtool/igb/kcompat.h