iSo in doing final checks on OCA firmware with all the latest tweaks the dup-ack checking

packet drill script was failing with a number of unexpected acks. So it turns
out if you have the default recvwin set up to 1Meg (like OCA's do) and you
have no window scaling (like the dupack checking code) then we have another
case where we are always trying to update the rwnd and sending an
ack when we should not.

Sponsored by:	Netflix Inc.
Differential Revision:	https://reviews.freebsd.org/D25298
This commit is contained in:
Randall Stewart 2020-06-16 18:16:45 +00:00
parent 01cf0a1724
commit 95ef69c63c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=362234
2 changed files with 6 additions and 7 deletions

View File

@ -12157,8 +12157,8 @@ bbr_output_wtime(struct tcpcb *tp, const struct timeval *tv)
* have gotten more data into the socket buffer to
* send.
*/
recwin = min(max(sbspace(&so->so_rcv), 0),
TCP_MAXWIN << tp->rcv_scale);
recwin = lmin(lmax(sbspace(&so->so_rcv), 0),
(long)TCP_MAXWIN << tp->rcv_scale);
if ((bbr_window_update_needed(tp, so, recwin, maxseg) == 0) &&
((tcp_outflags[tp->t_state] & TH_RST) == 0) &&
((sbavail(sb) + ((tcp_outflags[tp->t_state] & TH_FIN) ? 1 : 0)) <=
@ -12839,8 +12839,8 @@ bbr_output_wtime(struct tcpcb *tp, const struct timeval *tv)
ipoptlen == 0)
tso = 1;
recwin = min(max(sbspace(&so->so_rcv), 0),
TCP_MAXWIN << tp->rcv_scale);
recwin = lmin(lmax(sbspace(&so->so_rcv), 0),
(long)TCP_MAXWIN << tp->rcv_scale);
/*
* Sender silly window avoidance. We transmit under the following
* conditions when len is non-zero:

View File

@ -12750,7 +12750,8 @@ rack_output(struct tcpcb *tp)
flags &= ~TH_FIN;
}
}
recwin = sbspace(&so->so_rcv);
recwin = lmin(lmax(sbspace(&so->so_rcv), 0),
(long)TCP_MAXWIN << tp->rcv_scale);
/*
* Sender silly window avoidance. We transmit under the following
@ -13656,8 +13657,6 @@ rack_output(struct tcpcb *tp)
if (SEQ_GT(tp->rcv_adv, tp->rcv_nxt) &&
recwin < (long)(tp->rcv_adv - tp->rcv_nxt))
recwin = (long)(tp->rcv_adv - tp->rcv_nxt);
if (recwin > (long)TCP_MAXWIN << tp->rcv_scale)
recwin = (long)TCP_MAXWIN << tp->rcv_scale;
}
/*