diff options
author | hiren <hiren@FreeBSD.org> | 2015-12-09 08:53:41 +0000 |
---|---|---|
committer | hiren <hiren@FreeBSD.org> | 2015-12-09 08:53:41 +0000 |
commit | 6fab2b0d61f3120eeadb001ff2c5faf3829d8d69 (patch) | |
tree | 7b611e9307f572c13a23d65715d9ffb434968140 | |
parent | 2a4c4c39de7452606684428963e46946775686dc (diff) | |
download | FreeBSD-src-6fab2b0d61f3120eeadb001ff2c5faf3829d8d69.zip FreeBSD-src-6fab2b0d61f3120eeadb001ff2c5faf3829d8d69.tar.gz |
Add an option to use rfc6675 based pipe/inflight bytes calculation in newreno.
MFC after: 3 weeks
Sponsored by: Limelight Networks
-rw-r--r-- | sys/netinet/cc/cc_newreno.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/netinet/cc/cc_newreno.c b/sys/netinet/cc/cc_newreno.c index 96d64fe..31b70cc 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); } |