Author: hiren Date: Mon Jan 11 23:37:31 2016 New Revision: 293711 URL: https://svnweb.freebsd.org/changeset/base/293711
Log: MFC: r292011 MFC: r292012 Add an option to use rfc6675 based pipe/inflight bytes calculation in cubic and newreno. Modified: stable/10/sys/netinet/cc/cc_cubic.c stable/10/sys/netinet/cc/cc_newreno.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/cc/cc_cubic.c ============================================================================== --- stable/10/sys/netinet/cc/cc_cubic.c Mon Jan 11 23:34:29 2016 (r293710) +++ stable/10/sys/netinet/cc/cc_cubic.c Mon Jan 11 23:37:31 2016 (r293711) @@ -299,8 +299,10 @@ static void cubic_post_recovery(struct cc_var *ccv) { struct cubic *cubic_data; + int pipe; cubic_data = ccv->cc_data; + pipe = 0; /* Fast convergence heuristic. */ if (cubic_data->max_cwnd < cubic_data->prev_max_cwnd) @@ -315,10 +317,13 @@ cubic_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 /* Update cwnd based on beta and adjusted max_cwnd. */ CCV(ccv, snd_cwnd) = max(1, ((CUBIC_BETA * Modified: stable/10/sys/netinet/cc/cc_newreno.c ============================================================================== --- stable/10/sys/netinet/cc/cc_newreno.c Mon Jan 11 23:34:29 2016 (r293710) +++ stable/10/sys/netinet/cc/cc_newreno.c Mon Jan 11 23:37:31 2016 (r293711) @@ -214,6 +214,9 @@ newreno_cong_signal(struct cc_var *ccv, 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); } _______________________________________________ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"