Add an option to use rfc6675 based pipe/inflight bytes calculation in cubic.

Reviewed by:		gnn
MFC after:		3 weeks
Sponsored by:		Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D4205
This commit is contained in:
Hiren Panchasara 2015-12-09 07:56:40 +00:00
parent 610126e3a5
commit f81bc34eac

View File

@ -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 *