RFC 3465 defines a limit L used in TCP slow start for limiting the number

of acked bytes as described in Section 2.2 of that document.
This patch ensures that this limit is not also applied in congestion
avoidance. Applying this limit also in congestion avoidance can result in
using less bandwidth than allowed.

Reported by:		l.tian.email@gmail.com
Reviewed by:		rrs, rscheff
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D26120
This commit is contained in:
Michael Tuexen 2020-08-25 09:42:03 +00:00
parent 46c8c5540f
commit 1951fa791e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=364754
2 changed files with 2 additions and 4 deletions

View File

@ -349,8 +349,7 @@ cc_ack_received(struct tcpcb *tp, struct tcphdr *th, uint16_t nsegs,
}
#endif /* STATS */
if (tp->snd_cwnd > tp->snd_ssthresh) {
tp->t_bytes_acked += min(tp->ccv->bytes_this_ack,
nsegs * V_tcp_abc_l_var * tcp_maxseg(tp));
tp->t_bytes_acked += tp->ccv->bytes_this_ack;
if (tp->t_bytes_acked >= tp->snd_cwnd) {
tp->t_bytes_acked -= tp->snd_cwnd;
tp->ccv->flags |= CCF_ABC_SENTAWND;

View File

@ -3911,8 +3911,7 @@ rack_ack_received(struct tcpcb *tp, struct tcp_rack *rack, struct tcphdr *th, ui
#endif
}
if (rack->r_ctl.cwnd_to_use > tp->snd_ssthresh) {
tp->t_bytes_acked += min(tp->ccv->bytes_this_ack,
nsegs * V_tcp_abc_l_var * ctf_fixed_maxseg(tp));
tp->t_bytes_acked += tp->ccv->bytes_this_ack;
if (tp->t_bytes_acked >= rack->r_ctl.cwnd_to_use) {
tp->t_bytes_acked -= rack->r_ctl.cwnd_to_use;
tp->ccv->flags |= CCF_ABC_SENTAWND;