From: Chuck Lever <chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> To: bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Subject: [PATCH v2 5/9] svcrdma: Post Receives only for forward channel requests Date: Wed, 04 May 2016 10:53:22 -0400 [thread overview] Message-ID: <20160504145322.6602.71848.stgit@klimt.1015granger.net> (raw) In-Reply-To: <20160504144730.6602.89073.stgit-Hs+gFlyCn65vLzlybtyyYzGyq/o6K9yX@public.gmane.org> Since backward direction support was added, the rq_depth was increased to accommodate both forward and backward Receives. But only forward Receives need to be posted after a connection has been accepted. Receives for backward replies are posted as needed by svc_rdma_bc_sendto(). This doesn't break anything, but it means some resources are wasted. Fixes: 03fe9931536f ('svcrdma: Define maximum number of ...') Signed-off-by: Chuck Lever <chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> --- 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 d2680b8..02a112c 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c @@ -1083,7 +1083,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) newxprt->sc_dev_caps |= SVCRDMA_DEVCAP_READ_W_INV; /* Post receive buffers */ - for (i = 0; i < newxprt->sc_rq_depth; i++) { + for (i = 0; i < newxprt->sc_max_requests; i++) { ret = svc_rdma_post_recv(newxprt, GFP_KERNEL); if (ret) { dprintk("svcrdma: failure posting receive buffers\n"); -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Chuck Lever <chuck.lever@oracle.com> To: bfields@fieldses.org Cc: linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org Subject: [PATCH v2 5/9] svcrdma: Post Receives only for forward channel requests Date: Wed, 04 May 2016 10:53:22 -0400 [thread overview] Message-ID: <20160504145322.6602.71848.stgit@klimt.1015granger.net> (raw) In-Reply-To: <20160504144730.6602.89073.stgit@klimt.1015granger.net> Since backward direction support was added, the rq_depth was increased to accommodate both forward and backward Receives. But only forward Receives need to be posted after a connection has been accepted. Receives for backward replies are posted as needed by svc_rdma_bc_sendto(). This doesn't break anything, but it means some resources are wasted. Fixes: 03fe9931536f ('svcrdma: Define maximum number of ...') Signed-off-by: Chuck Lever <chuck.lever@oracle.com> --- 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 d2680b8..02a112c 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c @@ -1083,7 +1083,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) newxprt->sc_dev_caps |= SVCRDMA_DEVCAP_READ_W_INV; /* Post receive buffers */ - for (i = 0; i < newxprt->sc_rq_depth; i++) { + for (i = 0; i < newxprt->sc_max_requests; i++) { ret = svc_rdma_post_recv(newxprt, GFP_KERNEL); if (ret) { dprintk("svcrdma: failure posting receive buffers\n");
next prev parent reply other threads:[~2016-05-04 14:53 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-05-04 14:52 [PATCH v2 0/9] NFS/RDMA server patches proposed for v4.7 Chuck Lever 2016-05-04 14:52 ` Chuck Lever [not found] ` <20160504144730.6602.89073.stgit-Hs+gFlyCn65vLzlybtyyYzGyq/o6K9yX@public.gmane.org> 2016-05-04 14:52 ` [PATCH v2 1/9] svcrdma: Support IPv6 with NFS/RDMA Chuck Lever 2016-05-04 14:52 ` Chuck Lever 2016-05-04 14:52 ` [PATCH v2 2/9] svcrdma: Do not add XDR padding to xdr_buf page vector Chuck Lever 2016-05-04 14:52 ` Chuck Lever 2016-05-04 14:53 ` [PATCH v2 3/9] svcrdma: svc_rdma_put_context() is invoked twice in Send error path Chuck Lever 2016-05-04 14:53 ` Chuck Lever 2016-05-04 14:53 ` [PATCH v2 4/9] svcrdma: Remove superfluous line from rdma_read_chunks() Chuck Lever 2016-05-04 14:53 ` Chuck Lever 2016-05-04 14:53 ` Chuck Lever [this message] 2016-05-04 14:53 ` [PATCH v2 5/9] svcrdma: Post Receives only for forward channel requests Chuck Lever 2016-05-04 14:53 ` [PATCH v2 6/9] svcrdma: Drain QP before freeing svcrdma_xprt Chuck Lever 2016-05-04 14:53 ` Chuck Lever 2016-05-04 14:53 ` [PATCH v2 7/9] svcrdma: Eliminate code duplication in svc_rdma_recvfrom() Chuck Lever 2016-05-04 14:53 ` Chuck Lever 2016-05-04 14:53 ` [PATCH v2 8/9] svcrdma: Generalize svc_rdma_xdr_decode_req() Chuck Lever 2016-05-04 14:53 ` Chuck Lever 2016-05-04 14:53 ` [PATCH v2 9/9] svcrdma: Simplify the check for backward direction replies Chuck Lever 2016-05-04 14:53 ` Chuck Lever 2016-05-13 20:12 ` [PATCH v2 0/9] NFS/RDMA server patches proposed for v4.7 J. Bruce Fields 2016-05-13 20:12 ` 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=20160504145322.6602.71848.stgit@klimt.1015granger.net \ --to=chuck.lever-qhclzuegtsvqt0dzr+alfa@public.gmane.org \ --cc=bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org \ --cc=linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.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: linkBe 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.