kni: fix ethtool build with kernel 4.11
authorFerruh Yigit <ferruh.yigit@intel.com>
Wed, 3 May 2017 16:00:16 +0000 (17:00 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 5 May 2017 13:42:12 +0000 (15:42 +0200)
commit9fb3cd2c041eeca30b6c46e5d555d857d6096ae7
treef3d58931a0f1873bf5056cbe286131272c88ac14
parentb5dc89392f42b8bad06f3dbf767425bd1a00e59b
kni: fix ethtool build with kernel 4.11

build error:
.../lib/librte_eal/linuxapp/kni/igb_main.c:1034:10:
error: implicit declaration of function ‘pci_enable_msix’
    err = pci_enable_msix(pdev,
              ^~~~~~~~~~~~~~~

This build error observed when CONFIG_RTE_KNI_KMOD_ETHTOOL config option
enabled.

Following Linux commit removes the pci_enable_msix()
Linux: 4244de1c64de ("PCI: remove pci_enable_msix")

Switch to pci_enable_msix_range() for kernel > 4.8 since current Linux
igb driver uses this function.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h