kni: fix build on Ubuntu 12.04 with kernel 3.13.0-30
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Tue, 24 Nov 2015 16:59:41 +0000 (16:59 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 24 Nov 2015 20:36:01 +0000 (21:36 +0100)
commit61cf620f957457c76ce46b12788a15b2bc2565b0
tree4b27d242164745b2e57058fcbd983518dd73fa38
parent7836894a641d3befe5c5c8e75f31f84ce4e9b4b2
kni: fix build on Ubuntu 12.04 with kernel 3.13.0-30

Fixes following error when Ubuntu 12.04 uses kernel 3.13.0-30-generic,
since skb_set_hash() is implemented in the kernel from 3.13.0-30,
which is declared as UBUNTU_KERNEL_VERSION(3,13,0,30,0) and not
UBUNTU_KERNEL_VERSION(3,13,0,30,54)

In file included
from /usr/src/linux-headers-3.13.0-30-generic/include/linux/if_ether.h:23:0,
from /tmp/dpdk/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_osdep.h:39,
from /tmp/dpdk/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_hw.h:31,
from /tmp/dpdk/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_api.h:31,
from /tmp/dpdk/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_mbx.h:31,
from /tmp/dpdk/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/e1000_mbx.c:28:
/usr/src/linux-headers-3.13.0-30-generic/include/linux/skbuff.h:740:1:
note: previous definition of ‘skb_set_hash’ was here
 skb_set_hash(struct sk_buff *skb, __u32 hash, enum pkt_hash_types type)
 ^

Fixes: e88c3b0a ("kni: fix build on Ubuntu 12.04.5")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h