svn commit: r299280 - head/sys/netinet/cc
Hiren Panchasara
hiren at FreeBSD.org
Mon May 9 19:19:04 UTC 2016
Author: hiren
Date: Mon May 9 19:19:03 2016
New Revision: 299280
URL: https://svnweb.freebsd.org/changeset/base/299280
Log:
Add an option to use rfc6675 based pipe/inflight bytes calculation in htcp.
Submitted by: Kevin Bowling <kevin.bowling at kev009.com>
MFC after: 1 week
Sponsored by: Limelight Networks
Modified:
head/sys/netinet/cc/cc_htcp.c
Modified: head/sys/netinet/cc/cc_htcp.c
==============================================================================
--- head/sys/netinet/cc/cc_htcp.c Mon May 9 18:53:46 2016 (r299279)
+++ head/sys/netinet/cc/cc_htcp.c Mon May 9 19:19:03 2016 (r299280)
@@ -346,8 +346,10 @@ htcp_mod_init(void)
static void
htcp_post_recovery(struct cc_var *ccv)
{
+ int pipe;
struct htcp *htcp_data;
+ pipe = 0;
htcp_data = ccv->cc_data;
if (IN_FASTRECOVERY(CCV(ccv, t_flags))) {
@@ -358,10 +360,13 @@ htcp_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) = max(1, ((htcp_data->beta *
htcp_data->prev_cwnd / CCV(ccv, t_maxseg))
More information about the svn-src-head
mailing list