From: Chuck Lever <chuck.lever@xxxxxxxxxx> The RDMA accept code requests enough RDMA contexts to read and write one page per maximum size RPC message, plus one context that is getting recycled for the next RPC. Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx> --- net/sunrpc/xprtrdma/svc_rdma_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index aca8bdf65d72..22687533c3e9 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c @@ -467,7 +467,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) * progress even if the client is using one rkey per page * in each Read chunk. */ - ctxts = 3 * RPCSVC_MAXPAGES; + ctxts = 3 * svc_serv_maxpages(xprt->xpt_server); newxprt->sc_sq_depth = rq_depth + ctxts; if (newxprt->sc_sq_depth > dev->attrs.max_qp_wr) newxprt->sc_sq_depth = dev->attrs.max_qp_wr; -- 2.49.0