Skip to content

Commit 01fd074

Browse files
committed
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 <[email protected]>
1 parent 89a80ed commit 01fd074

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

net/rxrpc/input.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,14 +333,16 @@ static void rxrpc_input_ackinfo(struct rxrpc_call *call, struct sk_buff *skb,
333333
struct rxrpc_skb_priv *sp = rxrpc_skb(skb);
334334
struct rxrpc_peer *peer;
335335
unsigned int mtu;
336+
u32 rwind = ntohl(ackinfo->rwind);
336337

337338
_proto("Rx ACK %%%u Info { rx=%u max=%u rwin=%u jm=%u }",
338339
sp->hdr.serial,
339340
ntohl(ackinfo->rxMTU), ntohl(ackinfo->maxMTU),
340-
ntohl(ackinfo->rwind), ntohl(ackinfo->jumbo_max));
341+
rwind, ntohl(ackinfo->jumbo_max));
341342

342-
if (call->tx_winsize > ntohl(ackinfo->rwind))
343-
call->tx_winsize = ntohl(ackinfo->rwind);
343+
if (rwind > RXRPC_RXTX_BUFF_SIZE - 1)
344+
rwind = RXRPC_RXTX_BUFF_SIZE - 1;
345+
call->tx_winsize = rwind;
344346

345347
mtu = min(ntohl(ackinfo->rxMTU), ntohl(ackinfo->maxMTU));
346348

0 commit comments

Comments
 (0)