]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
rxrpc: Allow tx_winsize to grow in response to an ACK
authorDavid Howells <dhowells@redhat.com>
Tue, 13 Sep 2016 09:23:01 +0000 (10:23 +0100)
committerDavid Howells <dhowells@redhat.com>
Tue, 13 Sep 2016 21:38:24 +0000 (22:38 +0100)
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>
net/rxrpc/input.c

index 5958ef8ba2a0fd6be67f50105ba47f78352b3ada..8e529afcd6c1131800bd8404ccd38dc845e68869 100644 (file)
@@ -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));