summaryrefslogtreecommitdiff
path: root/net/sunrpc/xprtrdma/transport.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2019-10-09 13:07:32 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2019-10-24 10:30:39 -0400
commiteea63ca7ffa1f3a4a0b02b902ec51eab2d4e9df4 (patch)
tree3822ce7ccdd478b4a85bcf38b0c79d138112ca69 /net/sunrpc/xprtrdma/transport.c
parenta31b2f939219dd9bffdf01a45bd91f209f8cc369 (diff)
downloadlinux-next-eea63ca7ffa1f3a4a0b02b902ec51eab2d4e9df4.tar.gz
xprtrdma: Initialize rb_credits in one place
Clean up/code de-duplication. Nit: RPC_CWNDSHIFT is incorrect as the initial value for xprt->cwnd. This mistake does not appear to have operational consequences, since the cwnd value is replaced with a valid value upon the first Receive completion. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/transport.c')
-rw-r--r--net/sunrpc/xprtrdma/transport.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
index c67d465dc062..0711308277eb 100644
--- a/net/sunrpc/xprtrdma/transport.c
+++ b/net/sunrpc/xprtrdma/transport.c
@@ -425,15 +425,6 @@ void xprt_rdma_close(struct rpc_xprt *xprt)
return;
rpcrdma_ep_disconnect(ep, ia);
- /* Prepare @xprt for the next connection by reinitializing
- * its credit grant to one (see RFC 8166, Section 3.3.3).
- */
- spin_lock(&xprt->transport_lock);
- r_xprt->rx_buf.rb_credits = 1;
- xprt->cong = 0;
- xprt->cwnd = RPC_CWNDSHIFT;
- spin_unlock(&xprt->transport_lock);
-
out:
xprt->reestablish_timeout = 0;
++xprt->connect_cookie;