kni: fix build with kernel 4.9
authorFerruh Yigit <ferruh.yigit@intel.com>
Mon, 17 Oct 2016 10:23:14 +0000 (11:23 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 25 Oct 2016 14:20:43 +0000 (16:20 +0200)
commit6445198f802d993c73f4b246353b2ceb2dfafc32
treefb64fc7a010223c6071938443c4079ba159e82bd
parent17351105097ffc13e42e6b2b9b0ee6c6c2cb802d
kni: fix build with kernel 4.9

compile error:
  CC [M]  .../lib/librte_eal/linuxapp/kni/igb_main.o
.../lib/librte_eal/linuxapp/kni/igb_main.c:2317:21:
error: initialization from incompatible pointer type
[-Werror=incompatible-pointer-types]
  .ndo_set_vf_vlan = igb_ndo_set_vf_vlan,
                     ^~~~~~~~~~~~~~~~~~~

Linux kernel 4.9 updates API for ndo_set_vf_vlan:
Linux: 79aab093a0b5 ("net: Update API for VF vlan protocol 802.1ad support")

Use new API for Linux kernels >= 4.9

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h