aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/cc/cc_htcp.c
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2019-05-09 07:11:08 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2019-05-09 07:11:08 +0000
commit5cc11a89dbaa63dd0f56c28187b48fd1c48b6dbb (patch)
tree0c6e26b8029b3379eec1d13215ad728747fb367d /sys/netinet/cc/cc_htcp.c
parent6ca363eb7b1f240f5a15b6ca7d9fa6c3f0041024 (diff)
downloadsrc-5cc11a89dbaa63dd0f56c28187b48fd1c48b6dbb.tar.gz
src-5cc11a89dbaa63dd0f56c28187b48fd1c48b6dbb.zip
Prevent cwnd to collapse down to 1 MSS after exiting recovery.
This is descrined in RFC 6582, which updates RFC 3782. Submitted by: Richard Scheffenegger Reviewed by: lstewart@ MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D17614
Notes
Notes: svn path=/head/; revision=347381
Diffstat (limited to 'sys/netinet/cc/cc_htcp.c')
-rw-r--r--sys/netinet/cc/cc_htcp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/netinet/cc/cc_htcp.c b/sys/netinet/cc/cc_htcp.c
index 30962485a3e7..1686a4e5553a 100644
--- a/sys/netinet/cc/cc_htcp.c
+++ b/sys/netinet/cc/cc_htcp.c
@@ -366,7 +366,12 @@ htcp_post_recovery(struct cc_var *ccv)
pipe = CCV(ccv, snd_max) - ccv->curack;
if (pipe < CCV(ccv, snd_ssthresh))
- CCV(ccv, snd_cwnd) = pipe + CCV(ccv, t_maxseg);
+ /*
+ * Ensure that cwnd down not collape to 1 MSS under
+ * adverse conditions. Implements RFC6582
+ */
+ CCV(ccv, snd_cwnd) = max(pipe, CCV(ccv, t_maxseg)) +
+ CCV(ccv, t_maxseg);
else
CCV(ccv, snd_cwnd) = max(1, ((htcp_data->beta *
htcp_data->prev_cwnd / CCV(ccv, t_maxseg))