Subject: Re: [PATCH 2/2][TCP] YeAH-TCP: limited slow start exported function

From: John Heffner <[email-masked]>
Date: Thu, 22 Feb 2007 09:25:07 -0500

My patch is meant as a replacement for YeAH patch 2/2, not meant to back 
it out.  You do still need the second hunk below.  Sorry 'bout that.

If you're going to apply YeAH patch 2/2 first, you will also need to 
remove the declaration of tcp_limited_slow_start() in include/net/tcp.h.

Thanks,
   -John

David Miller wrote:
> From: David Miller <[email-masked]>
> Date: Thu, 22 Feb 2007 00:27:04 -0800 (PST)
> 
>> I'll apply this, but could you please also when making suggestions
>> like this provide the patch necessary to kill the function added for
>> YeaH and the call site in the YeaH algorithm?
> 
> Here is how I'm resolving this:
> 
> diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
> index 2b4142b..5ee79f3 100644
> --- a/net/ipv4/tcp_cong.c
> +++ b/net/ipv4/tcp_cong.c
> @@ -310,29 +310,6 @@ void tcp_slow_start(struct tcp_sock *tp)
>  }
>  EXPORT_SYMBOL_GPL(tcp_slow_start);
>  
> -void tcp_limited_slow_start(struct tcp_sock *tp)
> -{
> -	/* RFC3742: limited slow start
> -	 * the window is increased by 1/K MSS for each arriving ACK,
> -	 * for K = int(cwnd/(0.5 max_ssthresh))
> -	 */
> -
> -	const int max_ssthresh = 100;
> -
> -	if (max_ssthresh > 0 && tp->snd_cwnd > max_ssthresh) {
> -		u32 k = max(tp->snd_cwnd / (max_ssthresh >> 1), 1U);
> -		if (++tp->snd_cwnd_cnt >= k) {
> -			if (tp->snd_cwnd < tp->snd_cwnd_clamp)
> -				tp->snd_cwnd++;
> -			tp->snd_cwnd_cnt = 0;
> -		}
> -	} else {
> -		if (tp->snd_cwnd < tp->snd_cwnd_clamp)
> -			tp->snd_cwnd++;
> -	}
> -}
> -EXPORT_SYMBOL_GPL(tcp_limited_slow_start);
> -
>  /*
>   * TCP Reno congestion control
>   * This is special case used for fallback as well.
> diff --git a/net/ipv4/tcp_yeah.c b/net/ipv4/tcp_yeah.c
> index 2d971d1..815e020 100644
> --- a/net/ipv4/tcp_yeah.c
> +++ b/net/ipv4/tcp_yeah.c
> @@ -104,7 +104,7 @@ static void tcp_yeah_cong_avoid(struct sock *sk, u32 ack,
>  		return;
>  
>  	if (tp->snd_cwnd <= tp->snd_ssthresh) {
> -		tcp_limited_slow_start(tp);
> +		tcp_slow_start(tp);
>  	} else if (!yeah->doing_reno_now) {
>  		/* Scalable */
>  
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to [email-masked]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html