aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2015-06-04 11:21:32 -0400
committerJ. Bruce Fields <bfields@redhat.com>2015-06-04 16:56:01 -0400
commit0380a3f37540ad0582b3c749a74fc127af914689 (patch)
treeb16bd25dca27461439076b4b607f9b8339a714c0
parentb7e0b9a965a116341b4ef86ab98ea2843b218271 (diff)
svcrdma: Add a separate "max data segs macro for svcrdma
The server and client maximum are architecturally independent. Allow changing one without affecting the other. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r--include/linux/sunrpc/svc_rdma.h7
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_transport.c2
-rw-r--r--net/sunrpc/xprtrdma/xprt_rdma.h6
3 files changed, 8 insertions, 7 deletions
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
index d26384b22126..cb94ee4181d4 100644
--- a/include/linux/sunrpc/svc_rdma.h
+++ b/include/linux/sunrpc/svc_rdma.h
@@ -172,6 +172,13 @@ struct svcxprt_rdma {
172#define RDMAXPRT_SQ_PENDING 2 172#define RDMAXPRT_SQ_PENDING 2
173#define RDMAXPRT_CONN_PENDING 3 173#define RDMAXPRT_CONN_PENDING 3
174 174
175#define RPCRDMA_MAX_SVC_SEGS (64) /* server max scatter/gather */
176#if RPCSVC_MAXPAYLOAD < (RPCRDMA_MAX_SVC_SEGS << PAGE_SHIFT)
177#define RPCRDMA_MAXPAYLOAD RPCSVC_MAXPAYLOAD
178#else
179#define RPCRDMA_MAXPAYLOAD (RPCRDMA_MAX_SVC_SEGS << PAGE_SHIFT)
180#endif
181
175#define RPCRDMA_LISTEN_BACKLOG 10 182#define RPCRDMA_LISTEN_BACKLOG 10
176/* The default ORD value is based on two outstanding full-size writes with a 183/* The default ORD value is based on two outstanding full-size writes with a
177 * page size of 4k, or 32k * 2 ops / 4k = 16 outstanding RDMA_READ. */ 184 * page size of 4k, or 32k * 2 ops / 4k = 16 outstanding RDMA_READ. */
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
index 1ed4740ff0b5..3b4c2ff66a2f 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
@@ -91,7 +91,7 @@ struct svc_xprt_class svc_rdma_class = {
91 .xcl_name = "rdma", 91 .xcl_name = "rdma",
92 .xcl_owner = THIS_MODULE, 92 .xcl_owner = THIS_MODULE,
93 .xcl_ops = &svc_rdma_ops, 93 .xcl_ops = &svc_rdma_ops,
94 .xcl_max_payload = RPCSVC_MAXPAYLOAD_RDMA, 94 .xcl_max_payload = RPCRDMA_MAXPAYLOAD,
95 .xcl_ident = XPRT_TRANSPORT_RDMA, 95 .xcl_ident = XPRT_TRANSPORT_RDMA,
96}; 96};
97 97
diff --git a/net/sunrpc/xprtrdma/xprt_rdma.h b/net/sunrpc/xprtrdma/xprt_rdma.h
index 78e0b8beaa36..e60907b0e1f1 100644
--- a/net/sunrpc/xprtrdma/xprt_rdma.h
+++ b/net/sunrpc/xprtrdma/xprt_rdma.h
@@ -487,10 +487,4 @@ extern struct kmem_cache *svc_rdma_ctxt_cachep;
487/* Workqueue created in svc_rdma.c */ 487/* Workqueue created in svc_rdma.c */
488extern struct workqueue_struct *svc_rdma_wq; 488extern struct workqueue_struct *svc_rdma_wq;
489 489
490#if RPCSVC_MAXPAYLOAD < (RPCRDMA_MAX_DATA_SEGS << PAGE_SHIFT)
491#define RPCSVC_MAXPAYLOAD_RDMA RPCSVC_MAXPAYLOAD
492#else
493#define RPCSVC_MAXPAYLOAD_RDMA (RPCRDMA_MAX_DATA_SEGS << PAGE_SHIFT)
494#endif
495
496#endif /* _LINUX_SUNRPC_XPRT_RDMA_H */ 490#endif /* _LINUX_SUNRPC_XPRT_RDMA_H */