summaryrefslogtreecommitdiffstats
path: root/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-build-with-kernel-4.0.patch
diff options
context:
space:
mode:
authorGeorge Nita <george.nita@enea.com>2015-10-24 05:11:58 +0200
committerGeorge Nita <george.nita@enea.com>2015-10-24 05:11:58 +0200
commit57c61fd48b417e790b2e65f359f2de370eb42310 (patch)
tree6e2f399caf5701874b2f66aa5ecf689ee9adf7f2 /meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-build-with-kernel-4.0.patch
parent385b6e75f1fe9c39c87ff179e6af8be4e80aa65f (diff)
parent9bdc2090ca821c6b43ec4e69ee9ac6a34dd35ca3 (diff)
downloadmeta-intel-57c61fd48b417e790b2e65f359f2de370eb42310.tar.gz
Merge remote-tracking branch 'origin/master' into master-enea
Diffstat (limited to 'meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-build-with-kernel-4.0.patch')
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-build-with-kernel-4.0.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-build-with-kernel-4.0.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-build-with-kernel-4.0.patch
new file mode 100644
index 00000000..625f0146
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-build-with-kernel-4.0.patch
@@ -0,0 +1,58 @@
1From 54117da1c945c046c6e3959db81511c78f876426 Mon Sep 17 00:00:00 2001
2From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
3Date: Tue, 28 Apr 2015 18:37:42 +0100
4Subject: [PATCH] kni: fix build with kernel 4.0
5
6Upstream-Status: Backport [2.1.0]
7
8Due to API changes in function pointer ndo_bridge_setlink
9(commit ad41faa8) and the rename of functions vlan_tx_*
10(commit df8a39de) in kernel 4.0, DPDK would not build.
11
12This patch adds the properly checks to fix the compilation.
13
14Reported-by: Stephen Hemminger <stephen@networkplumber.org>
15Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
16Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
17---
18 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 6 ++++++
19 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 6 ++++++
20 2 files changed, 12 insertions(+)
21
22diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
23index 24b147d..bc3c6a3 100644
24--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
25+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
26@@ -2198,8 +2198,14 @@ static int igb_ndo_fdb_dump(struct sk_buff *skb,
27 #endif /* USE_DEFAULT_FDB_DEL_DUMP */
28
29 #ifdef HAVE_BRIDGE_ATTRIBS
30+#ifdef HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS
31+static int igb_ndo_bridge_setlink(struct net_device *dev,
32+ struct nlmsghdr *nlh,
33+ u16 flags)
34+#else
35 static int igb_ndo_bridge_setlink(struct net_device *dev,
36 struct nlmsghdr *nlh)
37+#endif /* HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS */
38 {
39 struct igb_adapter *adapter = netdev_priv(dev);
40 struct e1000_hw *hw = &adapter->hw;
41diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
42index 2e7e714..54d1f86 100644
43--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
44+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
45@@ -3885,4 +3885,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
46 #define HAVE_NDO_FDB_ADD_VID
47 #endif /* >= 3.19.0 */
48
49+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) )
50+/* vlan_tx_xx functions got renamed to skb_vlan */
51+#define vlan_tx_tag_get skb_vlan_tag_get
52+#define vlan_tx_tag_present skb_vlan_tag_present
53+#define HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS
54+#endif /* 4.0.0 */
55 #endif /* _KCOMPAT_H_ */
56--
571.7.9.5
58