TCP window updates are only sent if the window can be increased by at

least 2 * MSS. However, if the receive buffer size is small, this might
be impossible. Add back a criterion to send a TCP window update if
the window can be increased by at least half of the receive buffer size.
This condition was removed in r242252. This patch simply brings it back.
PR:			211003
Reviewed by:		gnn
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D9475
This commit is contained in:
Michael Tuexen 2017-02-23 18:14:36 +00:00
parent d935f34b8f
commit 8d62aae8df
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=314155

View file

@ -696,6 +696,8 @@ tcp_output(struct tcpcb *tp)
recwin <= (so->so_rcv.sb_hiwat / 8) ||
so->so_rcv.sb_hiwat <= 8 * tp->t_maxseg))
goto send;
if (2 * adv >= (int32_t)so->so_rcv.sb_hiwat)
goto send;
}
dontupdate: