Skip to content

Commit e67792c

Browse files
committed
svcrdma: Reserve an extra WQE for ib_drain_rq()
Do as other ULPs already do: ensure there is an extra Receive WQE reserved for the tear-down drain WR. I haven't heard reports of problems but it can't hurt. Note that rq_depth is used to compute the Send Queue depth as well, so this fix should affect both the SQ and RQ. Signed-off-by: Chuck Lever <[email protected]>
1 parent c8004c1 commit e67792c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sunrpc/xprtrdma/svc_rdma_transport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
415415
if (newxprt->sc_max_send_sges > dev->attrs.max_send_sge)
416416
newxprt->sc_max_send_sges = dev->attrs.max_send_sge;
417417
rq_depth = newxprt->sc_max_requests + newxprt->sc_max_bc_requests +
418-
newxprt->sc_recv_batch;
418+
newxprt->sc_recv_batch + 1 /* drain */;
419419
if (rq_depth > dev->attrs.max_qp_wr) {
420420
rq_depth = dev->attrs.max_qp_wr;
421421
newxprt->sc_recv_batch = 1;

0 commit comments

Comments
 (0)