summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo de Lara <pablo.de.lara.guarch@intel.com>2015-07-15 16:13:07 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-07-16 16:52:27 +0200
commit056b56cb2193887b32e003d66ff08c5e7a9d0e6c (patch)
tree2d99b9de12141022cae31d797d750955fd18dd97
parentaf083e9fcc61fe5417a5c7f5561973eeebcc7222 (diff)
downloaddpdk-056b56cb2193887b32e003d66ff08c5e7a9d0e6c.zip
dpdk-056b56cb2193887b32e003d66ff08c5e7a9d0e6c.tar.gz
dpdk-056b56cb2193887b32e003d66ff08c5e7a9d0e6c.tar.xz
kni: fix build on SLES 12
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 <sotiris.salloumis@ericsson.com> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
-rw-r--r--lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h5
1 files changed, 5 insertions, 0 deletions
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 */