From a8aac461cbdb1e1ad4ef783d559c0d34f326e93d Mon Sep 17 00:00:00 2001 From: Jincheng Miao Date: Thu, 18 Dec 2014 14:50:29 +0800 Subject: [PATCH] kni: fix build on CentOS 6.6 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit From CentOS 6.6, function skb_set_hash is introduced, this breaks the previous assumption. So modify RHEL_RELEASE_VERSION from 7.0 to 6.6 to fix build for rte_kni.ko. Related mail from Barak Enat: http://dpdk.org/ml/archives/dev/2014-December/010124.html building error likes: CC [M] lib/librte_eal/linuxapp/kni/e1000_82575.o In file included from lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_osdep.h:41, from lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_hw.h:31, from lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_api.h:31, from lib/librte_eal/linuxapp/kni/e1000_82575.c:38: lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h:3870: error: conflicting types for ‘skb_set_hash’ include/linux/skbuff.h:620: note: previous definition of ‘skb_set_hash’ was here Reported-by: Barak Enat Signed-off-by: Jincheng Miao --- lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h index 3dbc07a4b4..1213cc6147 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h @@ -3860,7 +3860,7 @@ static inline struct sk_buff *__kc__vlan_hwaccel_put_tag(struct sk_buff *skb, #endif /* >= 3.10.0 */ #if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) ) -#if (!(RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,0))) +#if (!(RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6,6))) #if (!(UBUNTU_KERNEL_CODE >= UBUNTU_KERNEL_VERSION(3,13,0,30,54) \ && (UBUNTU_RELEASE_CODE == UBUNTU_RELEASE_VERSION(12,4) \ || UBUNTU_RELEASE_CODE == UBUNTU_RELEASE_VERSION(14,4)))) -- 2.20.1