diff options
author | Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com> | 2019-02-05 18:21:02 +0100 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2019-02-12 15:31:45 -0500 |
commit | a4cb5bdb754afe21f3e9e7164213e8600cf69427 (patch) | |
tree | 15d8ff9eca68d3bfade875653754e52963e0861e /net | |
parent | 8fc75bed96bb94e23ca51bd9be4daf65c57697bf (diff) | |
download | linux-a4cb5bdb754afe21f3e9e7164213e8600cf69427.tar.gz linux-a4cb5bdb754afe21f3e9e7164213e8600cf69427.tar.bz2 linux-a4cb5bdb754afe21f3e9e7164213e8600cf69427.zip |
xprtrdma: Make sure Send CQ is allocated on an existing compvec
Make sure the device has at least 2 completion vectors
before allocating to compvec#1
Fixes: a4699f5647f3 (xprtrdma: Put Send CQ in IB_POLL_WORKQUEUE mode)
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/xprtrdma/verbs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 4994e75945b8..21113bfd4eca 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -527,7 +527,8 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia, sendcq = ib_alloc_cq(ia->ri_device, NULL, ep->rep_attr.cap.max_send_wr + 1, - 1, IB_POLL_WORKQUEUE); + ia->ri_device->num_comp_vectors > 1 ? 1 : 0, + IB_POLL_WORKQUEUE); if (IS_ERR(sendcq)) { rc = PTR_ERR(sendcq); goto out1; |