summaryrefslogtreecommitdiffstats
path: root/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-kni-fix-build-with-kernel-3.19.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-kni-fix-build-with-kernel-3.19.patch')
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-kni-fix-build-with-kernel-3.19.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-kni-fix-build-with-kernel-3.19.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-kni-fix-build-with-kernel-3.19.patch
new file mode 100644
index 00000000..014fc63b
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-kni-fix-build-with-kernel-3.19.patch
@@ -0,0 +1,69 @@
1From 4e6326ae5375d55966a5c872f391cf99de373057 Mon Sep 17 00:00:00 2001
2From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
3Date: Sun, 22 Mar 2015 18:02:16 +0000
4Subject: [PATCH] kni: fix build with kernel 3.19
5
6Upstream-Status: Backport [2.1.0]
7
8Due to API changes in functions ndo_dflt_bridge_getlink
9(commit 2c3c031c) and ndo_fdb_add (commit f6f6424b)
10in kernel 3.19, DPDK would not build.
11
12This patch solves the problem, by checking the kernel version
13and adding the necessary new parameters.
14
15Mind that function igb_ndo_fdb_add does not need the extra parameter
16if USE_CONST_DEV_UC_CHAR is not set, since that macro is only defined
17when kernel is greater or equal than 3.7
18
19Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
20Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
21(cherry picked from commit 98f255ed0a4a73bf785e884dc2069405de840546)
22Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
23---
24 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 7 +++++++
25 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 4 ++++
26 2 files changed, 11 insertions(+)
27
28diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
29index a802a02..24b147d 100644
30--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
31+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
32@@ -2103,6 +2103,9 @@ static int igb_set_features(struct net_device *netdev,
33 static int igb_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
34 struct net_device *dev,
35 const unsigned char *addr,
36+#ifdef HAVE_NDO_FDB_ADD_VID
37+ u16 vid,
38+#endif
39 u16 flags)
40 #else
41 static int igb_ndo_fdb_add(struct ndmsg *ndm,
42@@ -2259,7 +2262,11 @@ static int igb_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
43 else
44 mode = BRIDGE_MODE_VEPA;
45
46+#ifdef HAVE_NDO_FDB_ADD_VID
47+ return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0);
48+#else
49 return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode);
50+#endif /* HAVE_NDO_FDB_ADD_VID */
51 }
52 #endif /* HAVE_BRIDGE_ATTRIBS */
53 #endif /* NTF_SELF */
54diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
55index 1213cc6..2e7e714 100644
56--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
57+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
58@@ -3881,4 +3881,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
59 #define HAVE_VF_MIN_MAX_TXRATE 1
60 #endif /* >= 3.16.0 */
61
62+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) )
63+#define HAVE_NDO_FDB_ADD_VID
64+#endif /* >= 3.19.0 */
65+
66 #endif /* _KCOMPAT_H_ */
67--
681.9.1
69