summaryrefslogtreecommitdiffstats
path: root/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-igb-build-with-kernel-4.1.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-igb-build-with-kernel-4.1.patch')
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-igb-build-with-kernel-4.1.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-igb-build-with-kernel-4.1.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-igb-build-with-kernel-4.1.patch
new file mode 100644
index 0000000..b76f501
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-igb-build-with-kernel-4.1.patch
@@ -0,0 +1,70 @@
1From 97ebf687c7a635ac6f1b1e22293ed7405668c66e Mon Sep 17 00:00:00 2001
2From: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
3Date: Fri, 26 Jun 2015 17:14:35 -0500
4Subject: [PATCH] kni: fix igb build with kernel 4.1
5
6Upstream-Status: Backport [2.1.0]
7
8ndo_bridge_getlink has changed in kernel release 4.1. It
9adds new parameter which breaks compilation.
10
11This patch add the properly checks to fix it.
12
13Linux: 46c264daaaa5 ("bridge/nl: remove wrong use of NLM_F_MULTI")
14
15Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
16Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
17Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
18---
19 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 10 ++++++++++
20 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 5 +++++
21 2 files changed, 15 insertions(+)
22
23diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
24index bc3c6a3..b99b365 100644
25--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
26+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
27@@ -2250,8 +2250,14 @@ static int igb_ndo_bridge_setlink(struct net_device *dev,
28 }
29
30 #ifdef HAVE_BRIDGE_FILTER
31+#ifdef HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK
32+static int igb_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
33+ struct net_device *dev, u32 filter_mask,
34+ int nlflags)
35+#else
36 static int igb_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
37 struct net_device *dev, u32 filter_mask)
38+#endif /* HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK */
39 #else
40 static int igb_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
41 struct net_device *dev)
42@@ -2269,7 +2275,11 @@ static int igb_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
43 mode = BRIDGE_MODE_VEPA;
44
45 #ifdef HAVE_NDO_FDB_ADD_VID
46+#ifdef HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK
47+ return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0, nlflags);
48+#else
49 return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0);
50+#endif /* HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK */
51 #else
52 return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode);
53 #endif /* HAVE_NDO_FDB_ADD_VID */
54diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
55index 54d1f86..2673281 100644
56--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
57+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
58@@ -3891,4 +3891,9 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
59 #define vlan_tx_tag_present skb_vlan_tag_present
60 #define HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS
61 #endif /* 4.0.0 */
62+
63+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) )
64+/* ndo_bridge_getlink adds new nlflags parameter */
65+#define HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK
66+#endif /* >= 4.1.0 */
67 #endif /* _KCOMPAT_H_ */
68--
691.7.9.5
70