xprtrdma: Connection becomes unstable after a reconnect
authorChuck Lever <chuck.lever@oracle.com>
Wed, 9 Oct 2019 17:07:27 +0000 (13:07 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Jan 2020 18:48:38 +0000 (19:48 +0100)
commitb2b36f91af22955cccbdc04a3bd3f59a8aeb8e0d
tree42fd8ddc634179345a9204df233d2f4b369b8d04
parentee978cecd88ede5aed5bb274ccc43bbd162ea39e
xprtrdma: Connection becomes unstable after a reconnect

commit a31b2f939219dd9bffdf01a45bd91f209f8cc369 upstream.

This is because xprt_request_get_cong() is allowing more than one
RPC Call to be transmitted before the first Receive on the new
connection. The first Receive fills the Receive Queue based on the
server's credit grant. Before that Receive, there is only a single
Receive WR posted because the client doesn't know the server's
credit grant.

Solution is to clear rq_cong on all outstanding rpc_rqsts when the
the cwnd is reset. This is because an RPC/RDMA credit is good for
one connection instance only.

Fixes: 75891f502f5f ("SUNRPC: Support for congestion control ... ")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sunrpc/xprtrdma/transport.c
net/sunrpc/xprtrdma/verbs.c