summaryrefslogtreecommitdiffstats
path: root/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-vhost-build-with-kernel-4.1.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-vhost-build-with-kernel-4.1.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-vhost-build-with-kernel-4.1.patch')
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-vhost-build-with-kernel-4.1.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-vhost-build-with-kernel-4.1.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-vhost-build-with-kernel-4.1.patch
new file mode 100644
index 00000000..1fcf12b4
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-vhost-build-with-kernel-4.1.patch
@@ -0,0 +1,69 @@
1From 289840d86ddaec3310ee1d6a85fe6f20384de615 Mon Sep 17 00:00:00 2001
2From: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
3Date: Fri, 26 Jun 2015 17:14:37 -0500
4Subject: [PATCH 2/2] kni: fix vhost build with kernel 4.1
5
6Upstream-Status: Backport [2.1.0]
7
8Parameters from sendmsg and recvmsg has been changed in 4.1 kernel.
9The function pointers belong to proto_ops structure were updated removing
10the struct kiocb parameter.
11
12Linux: 1b784140474e ("net: Remove iocb argument from sendmsg and recvmsg")
13
14Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
15Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
16(cherry picked from commit 8d8fb8aa5836e719d5fb896693b16afabd5118b9)
17Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
18---
19 lib/librte_eal/linuxapp/kni/compat.h | 4 ++++
20 lib/librte_eal/linuxapp/kni/kni_vhost.c | 10 ++++++++++
21 2 files changed, 14 insertions(+)
22
23diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h
24index 1ad22ba..cf100b6 100644
25--- a/lib/librte_eal/linuxapp/kni/compat.h
26+++ b/lib/librte_eal/linuxapp/kni/compat.h
27@@ -23,3 +23,7 @@
28 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
29 #define HAVE_IOV_ITER_MSGHDR
30 #endif
31+
32+#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) )
33+#define HAVE_KIOCB_MSG_PARAM
34+#endif /* < 4.1.0 */
35diff --git a/lib/librte_eal/linuxapp/kni/kni_vhost.c b/lib/librte_eal/linuxapp/kni/kni_vhost.c
36index 83d3351..4611ff4 100644
37--- a/lib/librte_eal/linuxapp/kni/kni_vhost.c
38+++ b/lib/librte_eal/linuxapp/kni/kni_vhost.c
39@@ -353,8 +353,13 @@ except:
40 }
41
42 static int
43+#ifdef HAVE_KIOCB_MSG_PARAM
44 kni_sock_sndmsg(struct kiocb *iocb, struct socket *sock,
45 struct msghdr *m, size_t total_len)
46+#else
47+kni_sock_sndmsg(struct socket *sock,
48+ struct msghdr *m, size_t total_len)
49+#endif /* HAVE_KIOCB_MSG_PARAM */
50 {
51 struct kni_vhost_queue *q =
52 container_of(sock->sk, struct kni_vhost_queue, sk);
53@@ -387,8 +392,13 @@ kni_sock_sndmsg(struct kiocb *iocb, struct socket *sock,
54 }
55
56 static int
57+#ifdef HAVE_KIOCB_MSG_PARAM
58 kni_sock_rcvmsg(struct kiocb *iocb, struct socket *sock,
59 struct msghdr *m, size_t len, int flags)
60+#else
61+kni_sock_rcvmsg(struct socket *sock,
62+ struct msghdr *m, size_t len, int flags)
63+#endif /* HAVE_KIOCB_MSG_PARAM */
64 {
65 int vnet_hdr_len = 0;
66 int pkt_len = 0;
67--
681.9.1
69