aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 8589c1ad55e3..c3658ff027a6 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -860,6 +860,17 @@ static void xs_tcp_set_buffer_size(struct rpc_xprt *xprt)
860 return; 860 return;
861} 861}
862 862
863/**
864 * xs_udp_timer - called when a retransmit timeout occurs on a UDP transport
865 * @task: task that timed out
866 *
867 * Adjust the congestion window after a retransmit timeout has occurred.
868 */
869static void xs_udp_timer(struct rpc_task *task)
870{
871 xprt_adjust_cwnd(task, -ETIMEDOUT);
872}
873
863static int xs_bindresvport(struct rpc_xprt *xprt, struct socket *sock) 874static int xs_bindresvport(struct rpc_xprt *xprt, struct socket *sock)
864{ 875{
865 struct sockaddr_in myaddr = { 876 struct sockaddr_in myaddr = {
@@ -1050,6 +1061,7 @@ static struct rpc_xprt_ops xs_udp_ops = {
1050 .connect = xs_connect, 1061 .connect = xs_connect,
1051 .send_request = xs_udp_send_request, 1062 .send_request = xs_udp_send_request,
1052 .set_retrans_timeout = xprt_set_retrans_timeout_rtt, 1063 .set_retrans_timeout = xprt_set_retrans_timeout_rtt,
1064 .timer = xs_udp_timer,
1053 .close = xs_close, 1065 .close = xs_close,
1054 .destroy = xs_destroy, 1066 .destroy = xs_destroy,
1055}; 1067};