diff options
author | David Howells <dhowells@redhat.com> | 2016-09-13 10:23:01 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2016-09-13 22:38:24 +0100 |
commit | 01fd0742248cfc99b3b0cba1e09e1c0ecb8658fa (patch) | |
tree | e5a8312ad06490b2fa9e34914b4a2a3d4621d782 /net/rxrpc/input.c | |
parent | 89a80ed4c09afb2aff6abe32f6dd68605f857a7d (diff) | |
download | linux-01fd0742248cfc99b3b0cba1e09e1c0ecb8658fa.tar.bz2 |
rxrpc: Allow tx_winsize to grow in response to an ACK
Allow tx_winsize to grow when the ACK info packet shows a larger receive
window at the other end rather than only permitting it to shrink.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/input.c')
-rw-r--r-- | net/rxrpc/input.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c index 5958ef8ba2a0..8e529afcd6c1 100644 --- a/net/rxrpc/input.c +++ b/net/rxrpc/input.c @@ -333,14 +333,16 @@ static void rxrpc_input_ackinfo(struct rxrpc_call *call, struct sk_buff *skb, struct rxrpc_skb_priv *sp = rxrpc_skb(skb); struct rxrpc_peer *peer; unsigned int mtu; + u32 rwind = ntohl(ackinfo->rwind); _proto("Rx ACK %%%u Info { rx=%u max=%u rwin=%u jm=%u }", sp->hdr.serial, ntohl(ackinfo->rxMTU), ntohl(ackinfo->maxMTU), - ntohl(ackinfo->rwind), ntohl(ackinfo->jumbo_max)); + rwind, ntohl(ackinfo->jumbo_max)); - if (call->tx_winsize > ntohl(ackinfo->rwind)) - call->tx_winsize = ntohl(ackinfo->rwind); + if (rwind > RXRPC_RXTX_BUFF_SIZE - 1) + rwind = RXRPC_RXTX_BUFF_SIZE - 1; + call->tx_winsize = rwind; mtu = min(ntohl(ackinfo->rxMTU), ntohl(ackinfo->maxMTU)); |