kni: fix build with kernel 3.19
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Sun, 22 Mar 2015 18:02:16 +0000 (18:02 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 23 Mar 2015 10:38:25 +0000 (11:38 +0100)
commit98f255ed0a4a73bf785e884dc2069405de840546
treec728792c5f2f1e8d593bd723b94bc7d2e3edebde
parent651dac9128703525aabc68a3aaee40b9704d19ed
kni: fix build with kernel 3.19

Due to API changes in functions ndo_dflt_bridge_getlink
(commit 2c3c031c) and ndo_fdb_add (commit f6f6424b)
in kernel 3.19, DPDK would not build.

This patch solves the problem, by checking the kernel version
and adding the necessary new parameters.

Mind that function igb_ndo_fdb_add does not need the extra parameter
if USE_CONST_DEV_UC_CHAR is not set, since that macro is only defined
when kernel is greater or equal than 3.7

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h