Skip to content

Commit a4cb5bd

Browse files
nmoreyamschuma-ntap
authored andcommitted
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: a4699f5 (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>
1 parent 8fc75be commit a4cb5bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/sunrpc/xprtrdma/verbs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,8 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia,
527527

528528
sendcq = ib_alloc_cq(ia->ri_device, NULL,
529529
ep->rep_attr.cap.max_send_wr + 1,
530-
1, IB_POLL_WORKQUEUE);
530+
ia->ri_device->num_comp_vectors > 1 ? 1 : 0,
531+
IB_POLL_WORKQUEUE);
531532
if (IS_ERR(sendcq)) {
532533
rc = PTR_ERR(sendcq);
533534
goto out1;

0 commit comments

Comments
 (0)