diff options
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.patch | 69 |
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 @@ | |||
1 | From 289840d86ddaec3310ee1d6a85fe6f20384de615 Mon Sep 17 00:00:00 2001 | ||
2 | From: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | ||
3 | Date: Fri, 26 Jun 2015 17:14:37 -0500 | ||
4 | Subject: [PATCH 2/2] kni: fix vhost build with kernel 4.1 | ||
5 | |||
6 | Upstream-Status: Backport [2.1.0] | ||
7 | |||
8 | Parameters from sendmsg and recvmsg has been changed in 4.1 kernel. | ||
9 | The function pointers belong to proto_ops structure were updated removing | ||
10 | the struct kiocb parameter. | ||
11 | |||
12 | Linux: 1b784140474e ("net: Remove iocb argument from sendmsg and recvmsg") | ||
13 | |||
14 | Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | ||
15 | Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> | ||
16 | (cherry picked from commit 8d8fb8aa5836e719d5fb896693b16afabd5118b9) | ||
17 | Signed-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 | |||
23 | diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h | ||
24 | index 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 */ | ||
35 | diff --git a/lib/librte_eal/linuxapp/kni/kni_vhost.c b/lib/librte_eal/linuxapp/kni/kni_vhost.c | ||
36 | index 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 | -- | ||
68 | 1.9.1 | ||
69 | |||