aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/cc
diff options
context:
space:
mode:
authorHiren Panchasara <hiren@FreeBSD.org>2015-12-09 08:53:41 +0000
committerHiren Panchasara <hiren@FreeBSD.org>2015-12-09 08:53:41 +0000
commita934d06194c38305e1fc459aa1d5d2b2fad5d6d5 (patch)
tree7b611e9307f572c13a23d65715d9ffb434968140 /sys/netinet/cc
parentf81bc34eac7de17d06b418b12ed3797c4297db24 (diff)
downloadsrc-a934d06194c38305e1fc459aa1d5d2b2fad5d6d5.tar.gz
src-a934d06194c38305e1fc459aa1d5d2b2fad5d6d5.zip
Add an option to use rfc6675 based pipe/inflight bytes calculation in newreno.
MFC after: 3 weeks Sponsored by: Limelight Networks
Notes
Notes: svn path=/head/; revision=292012
Diffstat (limited to 'sys/netinet/cc')
-rw-r--r--sys/netinet/cc/cc_newreno.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/netinet/cc/cc_newreno.c b/sys/netinet/cc/cc_newreno.c
index 96d64feed03a..31b70cc13192 100644
--- a/sys/netinet/cc/cc_newreno.c
+++ b/sys/netinet/cc/cc_newreno.c
@@ -214,6 +214,9 @@ newreno_cong_signal(struct cc_var *ccv, uint32_t type)
static void
newreno_post_recovery(struct cc_var *ccv)
{
+ int pipe;
+ pipe = 0;
+
if (IN_FASTRECOVERY(CCV(ccv, t_flags))) {
/*
* Fast recovery will conclude after returning from this
@@ -224,10 +227,13 @@ newreno_post_recovery(struct cc_var *ccv)
*
* XXXLAS: Find a way to do this without needing curack
*/
- if (SEQ_GT(ccv->curack + CCV(ccv, snd_ssthresh),
- CCV(ccv, snd_max)))
- CCV(ccv, snd_cwnd) = CCV(ccv, snd_max) -
- ccv->curack + CCV(ccv, t_maxseg);
+ if (V_tcp_do_rfc6675_pipe)
+ pipe = tcp_compute_pipe(ccv->ccvc.tcp);
+ else
+ pipe = CCV(ccv, snd_max) - ccv->curack;
+
+ if (pipe < CCV(ccv, snd_ssthresh))
+ CCV(ccv, snd_cwnd) = pipe + CCV(ccv, t_maxseg);
else
CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh);
}