net/ipv4/tcp_yeah.c
changeset 2 d1f6d8b6f81c
parent 0 aa628870c1d3
equal deleted inserted replaced
1:0056487c491e 2:d1f6d8b6f81c
    81 		tcp_slow_start(tp);
    81 		tcp_slow_start(tp);
    82 
    82 
    83 	else if (!yeah->doing_reno_now) {
    83 	else if (!yeah->doing_reno_now) {
    84 		/* Scalable */
    84 		/* Scalable */
    85 
    85 
    86 		tp->snd_cwnd_cnt+=yeah->pkts_acked;
    86 		tp->snd_cwnd_cnt += yeah->pkts_acked;
    87 		if (tp->snd_cwnd_cnt > min(tp->snd_cwnd, TCP_SCALABLE_AI_CNT)){
    87 		if (tp->snd_cwnd_cnt > min(tp->snd_cwnd, TCP_SCALABLE_AI_CNT)){
    88 			if (tp->snd_cwnd < tp->snd_cwnd_clamp)
    88 			if (tp->snd_cwnd < tp->snd_cwnd_clamp)
    89 				tp->snd_cwnd++;
    89 				tp->snd_cwnd++;
    90 			tp->snd_cwnd_cnt = 0;
    90 			tp->snd_cwnd_cnt = 0;
    91 		}
    91 		}
   222 
   222 
   223 		reduction = min( reduction, max(tp->snd_cwnd>>1, 2U) );
   223 		reduction = min( reduction, max(tp->snd_cwnd>>1, 2U) );
   224 
   224 
   225 		reduction = max( reduction, tp->snd_cwnd >> TCP_YEAH_DELTA);
   225 		reduction = max( reduction, tp->snd_cwnd >> TCP_YEAH_DELTA);
   226 	} else
   226 	} else
   227 		reduction = max(tp->snd_cwnd>>1,2U);
   227 		reduction = max(tp->snd_cwnd>>1, 2U);
   228 
   228 
   229 	yeah->fast_count = 0;
   229 	yeah->fast_count = 0;
   230 	yeah->reno_count = max(yeah->reno_count>>1, 2U);
   230 	yeah->reno_count = max(yeah->reno_count>>1, 2U);
   231 
   231 
   232 	return tp->snd_cwnd - reduction;
   232 	return tp->snd_cwnd - reduction;