If the new window size is less than the old window size, skip the

calculations to check if we should advertise a larger window.

Reviewed by:	gnn
MFC after:	2 weeks
Sponsored by:	Juniper Networks, Netflix
Differential Revision:	https://reviews.freebsd.org/D7076
Tested by:	Limelight, Netflix
This commit is contained in:
Jonathan T. Looney 2016-10-06 16:09:45 +00:00
parent 15c825712e
commit 0dda76b82b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=306768

View File

@ -654,10 +654,11 @@ tcp_output(struct tcpcb *tp)
oldwin = 0;
/*
* If the new window size ends up being the same as the old
* size when it is scaled, then don't force a window update.
* If the new window size ends up being the same as or less
* than the old size when it is scaled, then don't force
* a window update.
*/
if (oldwin >> tp->rcv_scale == (adv + oldwin) >> tp->rcv_scale)
if (oldwin >> tp->rcv_scale >= (adv + oldwin) >> tp->rcv_scale)
goto dontupdate;
if (adv >= (long)(2 * tp->t_maxseg) &&