netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] TCP:Fix a bug in strategy_allowed_congestion_control
       [not found] <47998B55.1030305@cn.fujitsu.com>
@ 2008-01-25 16:25 ` Stephen Hemminger
  2008-01-28  2:05   ` shanwei
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2008-01-25 16:25 UTC (permalink / raw)
  To: shanwei; +Cc: davem, netdev, Sam Jansen

On Fri, 25 Jan 2008 15:10:13 +0800
shanwei <shanwei@cn.fujitsu.com> wrote:

> hi all:
> 
> In strategy_allowed_congestion_control of the 2.6.24 kernel, 
> when sysctl_string return 1 on success,it should call 
> tcp_set_allowed_congestion_control to set the allowed congestion
> control.But, it don't.
> the sysctl_string return 1 on success, otherwise return negative,
> never return 0.The patch fix the problem.
> 
> Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
> 
> diff -Nuarp linux-2.6.24/net/ipv4/sysctl_net_ipv4.c linux-2.6.24-new/net/ipv4/sysctl_net_ipv4.c
> --- linux-2.6.24/net/ipv4/sysctl_net_ipv4.c	2008-01-25 06:58:37.000000000 +0800
> +++ linux-2.6.24-new/net/ipv4/sysctl_net_ipv4.c	2008-01-25 12:23:20.000000000 +0800
> @@ -248,7 +248,7 @@ static int strategy_allowed_congestion_c
>  
>  	tcp_get_available_congestion_control(tbl.data, tbl.maxlen);
>  	ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen);
> -	if (ret == 0 && newval && newlen)
> +	if (ret == 1 && newval && newlen)
>  		ret = tcp_set_allowed_congestion_control(tbl.data);
>  	kfree(tbl.data);
> 
> 

Acked-by: Stephen Hemminger <shemminger@vyatta.com>

This parallels previous fix by Sam Jansen.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] TCP:Fix a bug in strategy_allowed_congestion_control
  2008-01-25 16:25 ` [PATCH] TCP:Fix a bug in strategy_allowed_congestion_control Stephen Hemminger
@ 2008-01-28  2:05   ` shanwei
  2008-02-01  0:47     ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: shanwei @ 2008-01-28  2:05 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: davem, netdev, Sam Jansen

Stephen Hemminger 写道:
> On Fri, 25 Jan 2008 15:10:13 +0800
> shanwei <shanwei@cn.fujitsu.com> wrote:
> 
>> hi all:
>>
>> In strategy_allowed_congestion_control of the 2.6.24 kernel, 
>> when sysctl_string return 1 on success,it should call 
>> tcp_set_allowed_congestion_control to set the allowed congestion
>> control.But, it don't.
>> the sysctl_string return 1 on success, otherwise return negative,
>> never return 0.The patch fix the problem.
>>
>> Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
>>
>> diff -Nuarp linux-2.6.24/net/ipv4/sysctl_net_ipv4.c linux-2.6.24-new/net/ipv4/sysctl_net_ipv4.c
>> --- linux-2.6.24/net/ipv4/sysctl_net_ipv4.c	2008-01-25 06:58:37.000000000 +0800
>> +++ linux-2.6.24-new/net/ipv4/sysctl_net_ipv4.c	2008-01-25 12:23:20.000000000 +0800
>> @@ -248,7 +248,7 @@ static int strategy_allowed_congestion_c
>>  
>>  	tcp_get_available_congestion_control(tbl.data, tbl.maxlen);
>>  	ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen);
>> -	if (ret == 0 && newval && newlen)
>> +	if (ret == 1 && newval && newlen)
>>  		ret = tcp_set_allowed_congestion_control(tbl.data);
>>  	kfree(tbl.data);
>>
>>
> 
> Acked-by: Stephen Hemminger <shemminger@vyatta.com>
> 
> This parallels previous fix by Sam Jansen.
> 
> 
From the link:http://marc.info/?l=linux-netdev&m=119551836927062&w=2,
he only fix the sysctl_tcp_congestion_control function.
In the latest kernel, the sysctl_string problem is present.
Can this patch be applied?

 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] TCP:Fix a bug in strategy_allowed_congestion_control
  2008-01-28  2:05   ` shanwei
@ 2008-02-01  0:47     ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2008-02-01  0:47 UTC (permalink / raw)
  To: shanwei; +Cc: shemminger, netdev, sjansen

From: shanwei <shanwei@cn.fujitsu.com>
Date: Mon, 28 Jan 2008 10:05:35 +0800

> Stephen Hemminger 写道:
> > On Fri, 25 Jan 2008 15:10:13 +0800
> > shanwei <shanwei@cn.fujitsu.com> wrote:
> > 
> >> hi all:
> >>
> >> In strategy_allowed_congestion_control of the 2.6.24 kernel, 
> >> when sysctl_string return 1 on success,it should call 
> >> tcp_set_allowed_congestion_control to set the allowed congestion
> >> control.But, it don't.
> >> the sysctl_string return 1 on success, otherwise return negative,
> >> never return 0.The patch fix the problem.
> >>
> >> Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
> >>
> >> diff -Nuarp linux-2.6.24/net/ipv4/sysctl_net_ipv4.c linux-2.6.24-new/net/ipv4/sysctl_net_ipv4.c
> >> --- linux-2.6.24/net/ipv4/sysctl_net_ipv4.c	2008-01-25 06:58:37.000000000 +0800
> >> +++ linux-2.6.24-new/net/ipv4/sysctl_net_ipv4.c	2008-01-25 12:23:20.000000000 +0800
> >> @@ -248,7 +248,7 @@ static int strategy_allowed_congestion_c
> >>  
> >>  	tcp_get_available_congestion_control(tbl.data, tbl.maxlen);
> >>  	ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen);
> >> -	if (ret == 0 && newval && newlen)
> >> +	if (ret == 1 && newval && newlen)
> >>  		ret = tcp_set_allowed_congestion_control(tbl.data);
> >>  	kfree(tbl.data);
> >>
> >>
> > 
> > Acked-by: Stephen Hemminger <shemminger@vyatta.com>
> > 
> > This parallels previous fix by Sam Jansen.
> > 
> > 
> >From the link:http://marc.info/?l=linux-netdev&m=119551836927062&w=2,
> he only fix the sysctl_tcp_congestion_control function.
> In the latest kernel, the sysctl_string problem is present.
> Can this patch be applied?

Done.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-01  0:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <47998B55.1030305@cn.fujitsu.com>
2008-01-25 16:25 ` [PATCH] TCP:Fix a bug in strategy_allowed_congestion_control Stephen Hemminger
2008-01-28  2:05   ` shanwei
2008-02-01  0:47     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).