rxrpc: Wake up the transmitter if Rx window size increases on the peer
authorDavid Howells <dhowells@redhat.com>
Fri, 10 Mar 2017 07:48:49 +0000 (07:48 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:07:19 +0000 (10:07 +0100)
commit515d78dc0a89a14c10ce3b3f007c99508aa65e61
tree36359d15a53c9c29b7653e370276d6f89695ddef
parente85b9bc29b04bbde927c2c556e0832327bc62279
rxrpc: Wake up the transmitter if Rx window size increases on the peer

[ Upstream commit 702f2ac87a9a8da23bf8506466bc70175fc970b2 ]

The RxRPC ACK packet may contain an extension that includes the peer's
current Rx window size for this call.  We adjust the local Tx window size
to match.  However, the transmitter can stall if the receive window is
reduced to 0 by the peer and then reopened.

This is because the normal way that the transmitter is re-energised is by
dropping something out of our Tx queue and thus making space.  When a
single gap is made, the transmitter is woken up.  However, because there's
nothing in the Tx queue at this point, this doesn't happen.

To fix this, perform a wake_up() any time we see the peer's Rx window size
increasing.

The observable symptom is that calls start failing on ETIMEDOUT and the
following:

kAFS: SERVER DEAD state=-62

appears in dmesg.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/rxrpc/input.c