diff options
author | Hiren Panchasara <hiren@FreeBSD.org> | 2016-10-25 05:07:51 +0000 |
---|---|---|
committer | Hiren Panchasara <hiren@FreeBSD.org> | 2016-10-25 05:07:51 +0000 |
commit | dd13b7d3877a4613ff5b786e991bc4fb1f33ebf0 (patch) | |
tree | 3253e356c4556105cdb5df66903114e6aa6775d6 /sys/netinet/cc/cc_newreno.c | |
parent | 95d82360113ffbcc1fce3cf26cc92b00f2ab869b (diff) | |
download | src-dd13b7d3877a4613ff5b786e991bc4fb1f33ebf0.tar.gz src-dd13b7d3877a4613ff5b786e991bc4fb1f33ebf0.zip |
Undo r307899. It needs a bit more work and proper commit log.
Notes
Notes:
svn path=/head/; revision=307900
Diffstat (limited to 'sys/netinet/cc/cc_newreno.c')
-rw-r--r-- | sys/netinet/cc/cc_newreno.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/sys/netinet/cc/cc_newreno.c b/sys/netinet/cc/cc_newreno.c index 3aa16019657d..b2c72fe9fcb1 100644 --- a/sys/netinet/cc/cc_newreno.c +++ b/sys/netinet/cc/cc_newreno.c @@ -182,39 +182,30 @@ newreno_after_idle(struct cc_var *ccv) static void newreno_cong_signal(struct cc_var *ccv, uint32_t type) { - uint32_t cwin; - u_int mss; - - cwin = CCV(ccv, snd_cwnd); - mss = CCV(ccv, t_maxseg); + u_int win; /* Catch algos which mistakenly leak private signal types. */ KASSERT((type & CC_SIGPRIVMASK) == 0, ("%s: congestion signal type 0x%08x is private\n", __func__, type)); - cwin = max(2*mss, cwin/2); + win = max(CCV(ccv, snd_cwnd) / 2 / CCV(ccv, t_maxseg), 2) * + CCV(ccv, t_maxseg); switch (type) { case CC_NDUPACK: if (!IN_FASTRECOVERY(CCV(ccv, t_flags))) { - if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { - CCV(ccv, snd_ssthresh) = cwin; - CCV(ccv, snd_cwnd) = cwin; - } + if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) + CCV(ccv, snd_ssthresh) = win; ENTER_RECOVERY(CCV(ccv, t_flags)); } break; case CC_ECN: if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { - CCV(ccv, snd_ssthresh) = cwin; - CCV(ccv, snd_cwnd) = cwin; + CCV(ccv, snd_ssthresh) = win; + CCV(ccv, snd_cwnd) = win; ENTER_CONGRECOVERY(CCV(ccv, t_flags)); } break; - case CC_RTO: - CCV(ccv, snd_ssthresh) = cwin; - CCV(ccv, snd_cwnd) = mss; - break; } } |