aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtrdma/svc_rdma_sendto.c
diff options
context:
space:
mode:
authorTom Tucker <tom@opengridcomputing.com>2008-04-23 17:49:54 -0400
committerTom Tucker <tom@opengridcomputing.com>2008-05-19 08:33:43 -0400
commit0e7f011a19696cc25d68a8d6631fc6c5aa60a54c (patch)
tree2d87c078c835a3629cb0e053bd92911d019878b9 /net/sunrpc/xprtrdma/svc_rdma_sendto.c
parentaa3314c8d6da673b3454549eed45547a79f7cbe1 (diff)
svcrdma: Simplify receive buffer posting
The svcrdma transport provider currently allocates receive buffers to the RQ through the xpo_release_rqst method. This approach is overly complicated since it means that the rqstp rq_xprt_ctxt has to be selectively set based on whether the RPC is going to be processed immediately or deferred. Instead, just post the receive buffer when we are certain that we are replying in the send_reply function. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/svc_rdma_sendto.c')
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_sendto.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
index 981f190c1b39..f61d7bd105fb 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
@@ -389,6 +389,16 @@ static int send_reply(struct svcxprt_rdma *rdma,
389 int page_no; 389 int page_no;
390 int ret; 390 int ret;
391 391
392 /* Post a recv buffer to handle another request. */
393 ret = svc_rdma_post_recv(rdma);
394 if (ret) {
395 printk(KERN_INFO
396 "svcrdma: could not post a receive buffer, err=%d."
397 "Closing transport %p.\n", ret, rdma);
398 set_bit(XPT_CLOSE, &rdma->sc_xprt.xpt_flags);
399 return 0;
400 }
401
392 /* Prepare the context */ 402 /* Prepare the context */
393 ctxt->pages[0] = page; 403 ctxt->pages[0] = page;
394 ctxt->count = 1; 404 ctxt->count = 1;