Skip to content

Commit

Permalink
rxrpc: Allow tx_winsize to grow in response to an ACK
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Howells committed Sep 13, 2016
1 parent 89a80ed commit 01fd074
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions net/rxrpc/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit 01fd074

Please sign in to comment.