aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
authorChuck Lever <cel@netapp.com>2005-08-25 19:25:52 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-09-23 12:38:43 -0400
commit1570c1e41eabf6b7031f3e4322a2cf1cbe319fee (patch)
treeeee53757ac3e03d55b6c01bb0500996ba520a8bb /net/sunrpc/xprtsock.c
parent46c0ee8bc4ad3743de05e8b8b20201df44dcb6d3 (diff)
[PATCH] RPC: add generic interface for adjusting the congestion window
A new interface that allows transports to adjust their congestion window using the Van Jacobson implementation in xprt.c is provided. Test-plan: Use WAN simulation to cause sporadic bursty packet loss. Look for significant regression in performance or client stability. Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index c3658ff027a6..980f26504f48 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -460,8 +460,6 @@ static void xs_udp_data_ready(struct sock *sk, int len)
460 goto out_unlock; 460 goto out_unlock;
461 task = rovr->rq_task; 461 task = rovr->rq_task;
462 462
463 dprintk("RPC: %4d received reply\n", task->tk_pid);
464
465 if ((copied = rovr->rq_private_buf.buflen) > repsize) 463 if ((copied = rovr->rq_private_buf.buflen) > repsize)
466 copied = repsize; 464 copied = repsize;
467 465
@@ -472,7 +470,9 @@ static void xs_udp_data_ready(struct sock *sk, int len)
472 /* Something worked... */ 470 /* Something worked... */
473 dst_confirm(skb->dst); 471 dst_confirm(skb->dst);
474 472
475 xprt_complete_rqst(xprt, rovr, copied); 473 xprt_adjust_cwnd(task, copied);
474 xprt_update_rtt(task);
475 xprt_complete_rqst(task, copied);
476 476
477 out_unlock: 477 out_unlock:
478 spin_unlock(&xprt->transport_lock); 478 spin_unlock(&xprt->transport_lock);
@@ -634,11 +634,8 @@ static inline void xs_tcp_read_request(struct rpc_xprt *xprt, skb_reader_t *desc
634 } 634 }
635 635
636out: 636out:
637 if (!(xprt->tcp_flags & XPRT_COPY_DATA)) { 637 if (!(xprt->tcp_flags & XPRT_COPY_DATA))
638 dprintk("RPC: %4d received reply complete\n", 638 xprt_complete_rqst(req->rq_task, xprt->tcp_copied);
639 req->rq_task->tk_pid);
640 xprt_complete_rqst(xprt, req, xprt->tcp_copied);
641 }
642 spin_unlock(&xprt->transport_lock); 639 spin_unlock(&xprt->transport_lock);
643 xs_tcp_check_recm(xprt); 640 xs_tcp_check_recm(xprt);
644} 641}