All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: bfields@fieldses.org
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH v2 07/10] svcrdma: Add a separate "max data segs macro for svcrdma
Date: Tue, 26 May 2015 13:49:36 -0400	[thread overview]
Message-ID: <20150526174936.7061.22593.stgit@klimt.1015granger.net> (raw)
In-Reply-To: <20150526174401.7061.43137.stgit@klimt.1015granger.net>

The server and client maximum are architecturally independent.
Allow changing one without affecting the other.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 include/linux/sunrpc/svc_rdma.h          |    7 +++++++
 net/sunrpc/xprtrdma/svc_rdma_transport.c |    2 +-
 net/sunrpc/xprtrdma/xprt_rdma.h          |    6 ------
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
index d26384b..cb94ee4 100644
--- a/include/linux/sunrpc/svc_rdma.h
+++ b/include/linux/sunrpc/svc_rdma.h
@@ -172,6 +172,13 @@ struct svcxprt_rdma {
 #define RDMAXPRT_SQ_PENDING	2
 #define RDMAXPRT_CONN_PENDING	3
 
+#define RPCRDMA_MAX_SVC_SEGS	(64)	/* server max scatter/gather */
+#if RPCSVC_MAXPAYLOAD < (RPCRDMA_MAX_SVC_SEGS << PAGE_SHIFT)
+#define RPCRDMA_MAXPAYLOAD	RPCSVC_MAXPAYLOAD
+#else
+#define RPCRDMA_MAXPAYLOAD	(RPCRDMA_MAX_SVC_SEGS << PAGE_SHIFT)
+#endif
+
 #define RPCRDMA_LISTEN_BACKLOG  10
 /* The default ORD value is based on two outstanding full-size writes with a
  * 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 1ed4740..3b4c2ff 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 = {
 	.xcl_name = "rdma",
 	.xcl_owner = THIS_MODULE,
 	.xcl_ops = &svc_rdma_ops,
-	.xcl_max_payload = RPCSVC_MAXPAYLOAD_RDMA,
+	.xcl_max_payload = RPCRDMA_MAXPAYLOAD,
 	.xcl_ident = XPRT_TRANSPORT_RDMA,
 };
 
diff --git a/net/sunrpc/xprtrdma/xprt_rdma.h b/net/sunrpc/xprtrdma/xprt_rdma.h
index 78e0b8b..e60907b 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;
 /* Workqueue created in svc_rdma.c */
 extern struct workqueue_struct *svc_rdma_wq;
 
-#if RPCSVC_MAXPAYLOAD < (RPCRDMA_MAX_DATA_SEGS << PAGE_SHIFT)
-#define RPCSVC_MAXPAYLOAD_RDMA RPCSVC_MAXPAYLOAD
-#else
-#define RPCSVC_MAXPAYLOAD_RDMA (RPCRDMA_MAX_DATA_SEGS << PAGE_SHIFT)
-#endif
-
 #endif				/* _LINUX_SUNRPC_XPRT_RDMA_H */


  parent reply	other threads:[~2015-05-26 17:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26 17:48 [PATCH v2 00/10] NFS/RDMA server patches for 4.2 Chuck Lever
2015-05-26 17:48 ` [PATCH v2 01/10] svcrdma: Fix byte-swapping in svc_rdma_sendto.c Chuck Lever
2015-06-01 18:40   ` J. Bruce Fields
2015-06-01 18:47     ` Chuck Lever
2015-05-26 17:48 ` [PATCH v2 02/10] svcrdma: Add missing access_ok() call in svc_rdma.c Chuck Lever
2015-06-01 19:31   ` J. Bruce Fields
2015-06-01 20:01     ` Chuck Lever
2015-06-02 15:28       ` J. Bruce Fields
2015-05-26 17:48 ` [PATCH v2 03/10] SUNRPC: Move EXPORT_SYMBOL for svc_process Chuck Lever
2015-05-26 17:49 ` [PATCH v2 04/10] svcrdma: Remove svc_rdma_xdr_decode_deferred_req() Chuck Lever
2015-05-26 17:49 ` [PATCH v2 05/10] svcrdma: Keep rpcrdma_msg fields in network byte-order Chuck Lever
2015-05-26 17:49 ` [PATCH v2 06/10] svcrdma: Replace GFP_KERNEL in a loop with GFP_NOFAIL Chuck Lever
2015-05-26 17:49 ` Chuck Lever [this message]
2015-05-26 17:49 ` [PATCH v2 08/10] svcrdma: Add backward direction service for RPC/RDMA transport Chuck Lever
2015-06-01 20:26   ` J. Bruce Fields
2015-06-01 20:45     ` Chuck Lever
2015-06-02 15:30       ` J. Bruce Fields
2015-06-03 19:49         ` Chuck Lever
2015-06-03 19:47           ` J. Bruce Fields
2015-05-26 17:49 ` [PATCH v2 09/10] SUNRPC: Clean up bc_send() Chuck Lever
2015-06-01 20:19   ` Chuck Lever
2015-06-01 20:24     ` J. Bruce Fields
2015-05-26 17:50 ` [PATCH v2 10/10] rpcrdma: Merge svcrdma and xprtrdma modules into one Chuck Lever
2015-06-01 20:24   ` J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150526174936.7061.22593.stgit@klimt.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.