Skip to content

Commit

Permalink
xprtrdma: Make sure Send CQ is allocated on an existing compvec
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Chuck Lever <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
  • Loading branch information
nmorey authored and amschuma-ntap committed Feb 12, 2019
1 parent 8fc75be commit a4cb5bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/sunrpc/xprtrdma/verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a4cb5bd

Please sign in to comment.