]>
Commit | Line | Data |
---|---|---|
36e3f504 SL |
1 | From 9abd2655099f531240941b9e24286b3c67b79c64 Mon Sep 17 00:00:00 2001 |
2 | From: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com> | |
3 | Date: Tue, 5 Feb 2019 18:21:02 +0100 | |
4 | Subject: xprtrdma: Make sure Send CQ is allocated on an existing compvec | |
5 | ||
6 | [ Upstream commit a4cb5bdb754afe21f3e9e7164213e8600cf69427 ] | |
7 | ||
8 | Make sure the device has at least 2 completion vectors | |
9 | before allocating to compvec#1 | |
10 | ||
11 | Fixes: a4699f5647f3 (xprtrdma: Put Send CQ in IB_POLL_WORKQUEUE mode) | |
12 | Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com> | |
13 | Reviewed-by: Chuck Lever <chuck.lever@oracle.com> | |
14 | Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> | |
15 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
16 | --- | |
17 | net/sunrpc/xprtrdma/verbs.c | 3 ++- | |
18 | 1 file changed, 2 insertions(+), 1 deletion(-) | |
19 | ||
20 | diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c | |
21 | index 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 | -- | |
35 | 2.19.1 | |
36 |