aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Scheffenegger <rscheff@FreeBSD.org>2020-06-24 13:52:53 +0000
committerRichard Scheffenegger <rscheff@FreeBSD.org>2020-06-24 13:52:53 +0000
commit6e26dd0dbea6e240e25b9e63f31e0563317bb925 (patch)
tree836e6dc8a4c72ec7cd9ad789ad5a7f19fefd076a
parent9dc7d8a2460a0d4fa558f147f10341c035c1212f (diff)
downloadsrc-6e26dd0dbea6e240e25b9e63f31e0563317bb925.tar.gz
src-6e26dd0dbea6e240e25b9e63f31e0563317bb925.zip
TCP: fix cubic RTO reaction.
Proper TCP Cubic operation requires the knowledge of the maximum congestion window prior to the last congestion event. This restores and improves a bugfix previously added by jtl@ but subsequently removed due to a revert. Reported by: chengc_netapp.com Reviewed by: chengc_netapp.com, tuexen (mentor) Approved by: tuexen (mentor), rgrimes (mentor) MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D25133
Notes
Notes: svn path=/head/; revision=362580
-rw-r--r--sys/netinet/cc/cc_cubic.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/netinet/cc/cc_cubic.c b/sys/netinet/cc/cc_cubic.c
index cec5917e01b3..a98c1c5c75be 100644
--- a/sys/netinet/cc/cc_cubic.c
+++ b/sys/netinet/cc/cc_cubic.c
@@ -313,10 +313,15 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type)
* timeout has fired more than once, as there is a reasonable
* chance the first one is a false alarm and may not indicate
* congestion.
+ * This will put Cubic firmly into the concave / TCP friendly
+ * region, for a slower ramp-up after two consecutive RTOs.
*/
if (CCV(ccv, t_rxtshift) >= 2) {
cubic_data->flags |= CUBICFLAG_CONG_EVENT;
cubic_data->t_last_cong = ticks;
+ cubic_data->max_cwnd = CCV(ccv, snd_cwnd_prev);
+ cubic_data->K = cubic_k(cubic_data->max_cwnd /
+ CCV(ccv, t_maxseg));
}
break;
}