MFC: r292011

MFC: r292012

Add an option to use rfc6675 based pipe/inflight bytes calculation in cubic and
newreno.
This commit is contained in:
hiren 2016-01-11 23:37:31 +00:00
parent d2c2a54e08
commit 8a453508e4
2 changed files with 19 additions and 8 deletions

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 *

View File

@ -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);
}