kni: fix build with kernel 4.15
authorFerruh Yigit <ferruh.yigit@intel.com>
Tue, 28 Nov 2017 23:45:53 +0000 (23:45 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 15 Dec 2017 14:05:42 +0000 (15:05 +0100)
commitd291fb3a8d162161897636387910637bbe9cbf17
treeebe27a5a7ceb51722d66f2ff6d0f46971bffcfa5
parent224374cc0e3ca44af5141fb7035a97f338d00c18
kni: fix build with kernel 4.15

build error:
.../dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_main.c:2809:2:
 error: implicit declaration of function ‘setup_timer’;
 did you mean ‘sk_stop_timer’? [-Werror=implicit-function-declaration]
  setup_timer(&adapter->watchdog_timer, &igb_watchdog,
  ^~~~~~~~~~~
  sk_stop_timer
cc1: all warnings being treated as errors

error observed whed CONFIG_RTE_KNI_KMOD_ETHTOOL config option enabled.

Because Linux removed setup_timer macros for kernel version >= 4.15
Linux: 513ae785c63c ("timer: Remove setup_*timer() interface")

Replaced setup_timer with timer_setup for new kernel versions.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h