From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 03A65376D for ; Wed, 15 Jul 2015 17:13:14 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 15 Jul 2015 08:13:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,480,1432623600"; d="scan'208";a="524784601" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by FMSMGA003.fm.intel.com with ESMTP; 15 Jul 2015 08:13:08 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t6FFD7K8008520 for ; Wed, 15 Jul 2015 16:13:08 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id t6FFD7jm014891 for ; Wed, 15 Jul 2015 16:13:07 +0100 Received: (from pdelarax@localhost) by sivswdev02.ir.intel.com with id t6FFD76w014887 for dev@dpdk.org; Wed, 15 Jul 2015 16:13:07 +0100 From: Pablo de Lara To: dev@dpdk.org Date: Wed, 15 Jul 2015 16:13:07 +0100 Message-Id: <1436973187-14857-1-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] kni: fix compilation issue on SLES 12 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2015 15:13:15 -0000 SLES 12 has kernel 3.12, which original does not have skb_set_hash, but SuSE has added that function to the kernel integrated on it. Therefore, the function is not declared when compiling on this OS. Reported-by: Sotiris Salloumis Signed-off-by: Pablo de Lara --- lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h index 96d68a2..852f80f 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h @@ -707,6 +707,9 @@ struct _kc_ethtool_pauseparam { (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))) /* SLES11 SP3 is at least 3.0.61+ based */ #define SLE_VERSION_CODE SLE_VERSION(11,3,0) +#elif ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,28) ) +/* SLES12 is at least 3.12.28+ based */ +#define SLE_VERSION_CODE SLE_VERSION(12,0,0) #endif /* LINUX_VERSION_CODE == KERNEL_VERSION(x,y,z) */ #endif /* CONFIG_SUSE_KERNEL */ #ifndef SLE_VERSION_CODE @@ -3864,6 +3867,7 @@ static inline struct sk_buff *__kc__vlan_hwaccel_put_tag(struct sk_buff *skb, #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)))) +#if (!(SLE_VERSION_CODE == SLE_VERSION(12,0,0))) #ifdef NETIF_F_RXHASH #define PKT_HASH_TYPE_L3 0 static inline void @@ -3872,6 +3876,7 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) skb->rxhash = hash; } #endif /* NETIF_F_RXHASH */ +#endif /* < SLES12 */ #endif /* < 3.13.0-30.54 (Ubuntu 14.04) */ #endif /* < RHEL7 */ #endif /* < 3.14.0 */ -- 2.4.2