summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtrdma/svc_rdma.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2016-01-07 14:50:02 -0500
committerDoug Ledford <dledford@redhat.com>2016-01-19 15:30:48 -0500
commit03fe9931536fe4782e9e34f7f499d588acd2015b (patch)
treecfee0f65e50640e7daf02eff73e9748a2e1d8db5 /net/sunrpc/xprtrdma/svc_rdma.c
parentba986c96f907a513215fb7f1c0a89261c97251ca (diff)
downloadlinux-stable-03fe9931536fe4782e9e34f7f499d588acd2015b.tar.gz
linux-stable-03fe9931536fe4782e9e34f7f499d588acd2015b.tar.bz2
linux-stable-03fe9931536fe4782e9e34f7f499d588acd2015b.zip
svcrdma: Define maximum number of backchannel requests
Extra resources for handling backchannel requests have to be pre-allocated when a transport instance is created. Set up additional fields in svcxprt_rdma to track these resources. The max_requests fields are elements of the RPC-over-RDMA protocol, so they should be u32. To ensure that unsigned arithmetic is used everywhere, some other fields in the svcxprt_rdma struct are updated. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Acked-by: Bruce Fields <bfields@fieldses.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/svc_rdma.c')
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c
index e894e0698c45..c846ca9f1eba 100644
--- a/net/sunrpc/xprtrdma/svc_rdma.c
+++ b/net/sunrpc/xprtrdma/svc_rdma.c
@@ -55,6 +55,7 @@ unsigned int svcrdma_ord = RPCRDMA_ORD;
static unsigned int min_ord = 1;
static unsigned int max_ord = 4096;
unsigned int svcrdma_max_requests = RPCRDMA_MAX_REQUESTS;
+unsigned int svcrdma_max_bc_requests = RPCRDMA_MAX_BC_REQUESTS;
static unsigned int min_max_requests = 4;
static unsigned int max_max_requests = 16384;
unsigned int svcrdma_max_req_size = RPCRDMA_MAX_REQ_SIZE;
@@ -245,9 +246,10 @@ int svc_rdma_init(void)
{
dprintk("SVCRDMA Module Init, register RPC RDMA transport\n");
dprintk("\tsvcrdma_ord : %d\n", svcrdma_ord);
- dprintk("\tmax_requests : %d\n", svcrdma_max_requests);
- dprintk("\tsq_depth : %d\n",
+ dprintk("\tmax_requests : %u\n", svcrdma_max_requests);
+ dprintk("\tsq_depth : %u\n",
svcrdma_max_requests * RPCRDMA_SQ_DEPTH_MULT);
+ dprintk("\tmax_bc_requests : %u\n", svcrdma_max_bc_requests);
dprintk("\tmax_inline : %d\n", svcrdma_max_req_size);
svc_rdma_wq = alloc_workqueue("svc_rdma", 0, 0);