]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.19.31/xprtrdma-make-sure-send-cq-is-allocated-on-an-existi.patch
Linux 4.19.31
[thirdparty/kernel/stable-queue.git] / releases / 4.19.31 / xprtrdma-make-sure-send-cq-is-allocated-on-an-existi.patch
CommitLineData
36e3f504
SL
1From 9abd2655099f531240941b9e24286b3c67b79c64 Mon Sep 17 00:00:00 2001
2From: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
3Date: Tue, 5 Feb 2019 18:21:02 +0100
4Subject: xprtrdma: Make sure Send CQ is allocated on an existing compvec
5
6[ Upstream commit a4cb5bdb754afe21f3e9e7164213e8600cf69427 ]
7
8Make sure the device has at least 2 completion vectors
9before allocating to compvec#1
10
11Fixes: a4699f5647f3 (xprtrdma: Put Send CQ in IB_POLL_WORKQUEUE mode)
12Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
13Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
14Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
15Signed-off-by: Sasha Levin <sashal@kernel.org>
16---
17 net/sunrpc/xprtrdma/verbs.c | 3 ++-
18 1 file changed, 2 insertions(+), 1 deletion(-)
19
20diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
21index 3d6bf790cf1f..5ddbf227e7c6 100644
22--- a/net/sunrpc/xprtrdma/verbs.c
23+++ b/net/sunrpc/xprtrdma/verbs.c
24@@ -546,7 +546,8 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia,
25
26 sendcq = ib_alloc_cq(ia->ri_device, NULL,
27 ep->rep_attr.cap.max_send_wr + 1,
28- 1, IB_POLL_WORKQUEUE);
29+ ia->ri_device->num_comp_vectors > 1 ? 1 : 0,
30+ IB_POLL_WORKQUEUE);
31 if (IS_ERR(sendcq)) {
32 rc = PTR_ERR(sendcq);
33 dprintk("RPC: %s: failed to create send CQ: %i\n",
34--
352.19.1
36