netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sctp: make the max_burst min value to 1
@ 2013-12-02  6:51 Wang Weidong
  2013-12-02 11:56 ` Neil Horman
  2013-12-04  9:32 ` [PATCH v2] " Wang Weidong
  0 siblings, 2 replies; 13+ messages in thread
From: Wang Weidong @ 2013-12-02  6:51 UTC (permalink / raw)
  To: Vlad Yasevich, nhorman, David Miller; +Cc: linux-sctp, netdev, dingtianhong

From: Wang Weidong <wangweidong1@huawei.com>

when I setted the max_burst to 0, do the lksctp-tools I got hang.
I found sctp_transport_burst_limited would make the cwnd to 0.
so I make the max_burst min value to 1.
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
---
 net/sctp/sysctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index 7637e8e..46832d3 100644
--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
@@ -135,7 +135,7 @@ static struct ctl_table sctp_net_table[] = {
 		.maxlen		= sizeof(int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_minmax,
-		.extra1		= &zero,
+		.extra1		= &one,
 		.extra2		= &int_max
 	},
 	{
-- 
1.7.12

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

* Re: [PATCH] sctp: make the max_burst min value to 1
  2013-12-02  6:51 [PATCH] sctp: make the max_burst min value to 1 Wang Weidong
@ 2013-12-02 11:56 ` Neil Horman
  2013-12-02 12:03   ` Wang Weidong
  2013-12-02 13:08   ` Michael Tuexen
  2013-12-04  9:32 ` [PATCH v2] " Wang Weidong
  1 sibling, 2 replies; 13+ messages in thread
From: Neil Horman @ 2013-12-02 11:56 UTC (permalink / raw)
  To: Wang Weidong
  Cc: Vlad Yasevich, David Miller, linux-sctp, netdev, dingtianhong

On Mon, Dec 02, 2013 at 02:51:45PM +0800, Wang Weidong wrote:
> From: Wang Weidong <wangweidong1@huawei.com>
> 
> when I setted the max_burst to 0, do the lksctp-tools I got hang.
> I found sctp_transport_burst_limited would make the cwnd to 0.
> so I make the max_burst min value to 1.
> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
> ---
>  net/sctp/sysctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
> index 7637e8e..46832d3 100644
> --- a/net/sctp/sysctl.c
> +++ b/net/sctp/sysctl.c
> @@ -135,7 +135,7 @@ static struct ctl_table sctp_net_table[] = {
>  		.maxlen		= sizeof(int),
>  		.mode		= 0644,
>  		.proc_handler	= proc_dointvec_minmax,
> -		.extra1		= &zero,
> +		.extra1		= &one,
>  		.extra2		= &int_max
>  	},
>  	{
> -- 
> 1.7.12
> 
> 


This seems like a band-aid to me.  There are a few things wrong:

1) You can also set the the max_burst via setsockopt, and so this would need to
be checked in that path as well.

2) I don't see how having a cwnd of zero would cause a hang.  It looks like a
cwnd of zero would perpetually place the association in a slow start state,
which is silly but not illegal.  

Please investigate the acutally root cause of the problem before just avoiding
it like this.

Thanks!
Neil

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

* Re: [PATCH] sctp: make the max_burst min value to 1
  2013-12-02 11:56 ` Neil Horman
@ 2013-12-02 12:03   ` Wang Weidong
  2013-12-02 14:51     ` Vlad Yasevich
  2013-12-02 13:08   ` Michael Tuexen
  1 sibling, 1 reply; 13+ messages in thread
From: Wang Weidong @ 2013-12-02 12:03 UTC (permalink / raw)
  To: Neil Horman; +Cc: Vlad Yasevich, David Miller, linux-sctp, netdev, dingtianhong

On 2013/12/2 19:56, Neil Horman wrote:
> On Mon, Dec 02, 2013 at 02:51:45PM +0800, Wang Weidong wrote:
>> From: Wang Weidong <wangweidong1@huawei.com>
>>
>> when I setted the max_burst to 0, do the lksctp-tools I got hang.
>> I found sctp_transport_burst_limited would make the cwnd to 0.
>> so I make the max_burst min value to 1.
>> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
>> ---
>>  net/sctp/sysctl.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
>> index 7637e8e..46832d3 100644
>> --- a/net/sctp/sysctl.c
>> +++ b/net/sctp/sysctl.c
>> @@ -135,7 +135,7 @@ static struct ctl_table sctp_net_table[] = {
>>  		.maxlen		= sizeof(int),
>>  		.mode		= 0644,
>>  		.proc_handler	= proc_dointvec_minmax,
>> -		.extra1		= &zero,
>> +		.extra1		= &one,
>>  		.extra2		= &int_max
>>  	},
>>  	{
>> -- 
>> 1.7.12
>>
>>
> 
> 
> This seems like a band-aid to me.  There are a few things wrong:
> 
> 1) You can also set the the max_burst via setsockopt, and so this would need to
> be checked in that path as well.
> 
> 2) I don't see how having a cwnd of zero would cause a hang.  It looks like a
> cwnd of zero would perpetually place the association in a slow start state,
> which is silly but not illegal.  
> 

Hm, Good suggestions. Ok, I will try it again and find the root cause.
Thanks!

> Please investigate the acutally root cause of the problem before just avoiding
> it like this.
> 
> Thanks!
> Neil
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

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

* Re: [PATCH] sctp: make the max_burst min value to 1
  2013-12-02 11:56 ` Neil Horman
  2013-12-02 12:03   ` Wang Weidong
@ 2013-12-02 13:08   ` Michael Tuexen
  2013-12-03  6:30     ` [PATCH] sctp: disable max_burst when the max_burst is 0 Wang Weidong
  1 sibling, 1 reply; 13+ messages in thread
From: Michael Tuexen @ 2013-12-02 13:08 UTC (permalink / raw)
  To: Neil Horman
  Cc: Wang Weidong, Vlad Yasevich, David Miller, linux-sctp, netdev,
	dingtianhong

On Dec 2, 2013, at 12:56 PM, Neil Horman <nhorman@tuxdriver.com> wrote:

> On Mon, Dec 02, 2013 at 02:51:45PM +0800, Wang Weidong wrote:
>> From: Wang Weidong <wangweidong1@huawei.com>
>> 
>> when I setted the max_burst to 0, do the lksctp-tools I got hang.
>> I found sctp_transport_burst_limited would make the cwnd to 0.
>> so I make the max_burst min value to 1.
>> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
>> ---
>> net/sctp/sysctl.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
>> index 7637e8e..46832d3 100644
>> --- a/net/sctp/sysctl.c
>> +++ b/net/sctp/sysctl.c
>> @@ -135,7 +135,7 @@ static struct ctl_table sctp_net_table[] = {
>> 		.maxlen		= sizeof(int),
>> 		.mode		= 0644,
>> 		.proc_handler	= proc_dointvec_minmax,
>> -		.extra1		= &zero,
>> +		.extra1		= &one,
>> 		.extra2		= &int_max
>> 	},
>> 	{
>> -- 
>> 1.7.12
>> 
>> 
> 
> 
> This seems like a band-aid to me.  There are a few things wrong:
> 
> 1) You can also set the the max_burst via setsockopt, and so this would need to
> be checked in that path as well.
> 
> 2) I don't see how having a cwnd of zero would cause a hang.  It looks like a
> cwnd of zero would perpetually place the association in a slow start state,
> which is silly but not illegal.  
> 
> Please investigate the acutally root cause of the problem before just avoiding
> it like this.
I second this.

Please note the using max_burst of  in the socket option means that you
deactivate max_burst, not that you actually use the value 0. See
http://tools.ietf.org/html/rfc6458#section-8.1.24

I FreeBSD we use the sysctl variable as the default for sockets. Therefore
max_burst is a valid value, it just disables max_burst.

Best regards
Michael
> 
> Thanks!
> Neil
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH] sctp: make the max_burst min value to 1
  2013-12-02 12:03   ` Wang Weidong
@ 2013-12-02 14:51     ` Vlad Yasevich
  2013-12-03  1:35       ` Wang Weidong
  0 siblings, 1 reply; 13+ messages in thread
From: Vlad Yasevich @ 2013-12-02 14:51 UTC (permalink / raw)
  To: Wang Weidong, Neil Horman; +Cc: David Miller, linux-sctp, netdev, dingtianhong

On 12/02/2013 07:03 AM, Wang Weidong wrote:
> On 2013/12/2 19:56, Neil Horman wrote:
>> On Mon, Dec 02, 2013 at 02:51:45PM +0800, Wang Weidong wrote:
>>> From: Wang Weidong <wangweidong1@huawei.com>
>>>
>>> when I setted the max_burst to 0, do the lksctp-tools I got hang.
>>> I found sctp_transport_burst_limited would make the cwnd to 0.
>>> so I make the max_burst min value to 1.
>>> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
>>> ---
>>>  net/sctp/sysctl.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
>>> index 7637e8e..46832d3 100644
>>> --- a/net/sctp/sysctl.c
>>> +++ b/net/sctp/sysctl.c
>>> @@ -135,7 +135,7 @@ static struct ctl_table sctp_net_table[] = {
>>>  		.maxlen		= sizeof(int),
>>>  		.mode		= 0644,
>>>  		.proc_handler	= proc_dointvec_minmax,
>>> -		.extra1		= &zero,
>>> +		.extra1		= &one,
>>>  		.extra2		= &int_max
>>>  	},
>>>  	{
>>> -- 
>>> 1.7.12
>>>
>>>
>>
>>
>> This seems like a band-aid to me.  There are a few things wrong:
>>
>> 1) You can also set the the max_burst via setsockopt, and so this would need to
>> be checked in that path as well.
>>
>> 2) I don't see how having a cwnd of zero would cause a hang.  It looks like a
>> cwnd of zero would perpetually place the association in a slow start state,
>> which is silly but not illegal.  
>>
> 
> Hm, Good suggestions. Ok, I will try it again and find the root cause.
> Thanks!

It's really simple.  sctp_transport_burst_limited() should simply do
nothing if max_burst is 0, essentially allowing unlimited bursts.

-vlad

> 
>> Please investigate the acutally root cause of the problem before just avoiding
>> it like this.
>>
>> Thanks!
>> Neil
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>>
> 
> 

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

* Re: [PATCH] sctp: make the max_burst min value to 1
  2013-12-02 14:51     ` Vlad Yasevich
@ 2013-12-03  1:35       ` Wang Weidong
  0 siblings, 0 replies; 13+ messages in thread
From: Wang Weidong @ 2013-12-03  1:35 UTC (permalink / raw)
  To: Vlad Yasevich, Neil Horman, Michael.Tuexen
  Cc: linux-sctp, netdev, dingtianhong, David Miller

On 2013/12/2 22:51, Vlad Yasevich wrote:
> On 12/02/2013 07:03 AM, Wang Weidong wrote:
>> On 2013/12/2 19:56, Neil Horman wrote:
>>> On Mon, Dec 02, 2013 at 02:51:45PM +0800, Wang Weidong wrote:
>>>> From: Wang Weidong <wangweidong1@huawei.com>
>>>>
>>>> when I setted the max_burst to 0, do the lksctp-tools I got hang.
>>>> I found sctp_transport_burst_limited would make the cwnd to 0.
>>>> so I make the max_burst min value to 1.
>>>> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
>>>> ---
>>>>  net/sctp/sysctl.c | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
>>>> index 7637e8e..46832d3 100644
>>>> --- a/net/sctp/sysctl.c
>>>> +++ b/net/sctp/sysctl.c
>>>> @@ -135,7 +135,7 @@ static struct ctl_table sctp_net_table[] = {
>>>>  		.maxlen		= sizeof(int),
>>>>  		.mode		= 0644,
>>>>  		.proc_handler	= proc_dointvec_minmax,
>>>> -		.extra1		= &zero,
>>>> +		.extra1		= &one,
>>>>  		.extra2		= &int_max
>>>>  	},
>>>>  	{
>>>> -- 
>>>> 1.7.12
>>>>
>>>>
>>>
>>>
>>> This seems like a band-aid to me.  There are a few things wrong:
>>>
>>> 1) You can also set the the max_burst via setsockopt, and so this would need to
>>> be checked in that path as well.
>>>
>>> 2) I don't see how having a cwnd of zero would cause a hang.  It looks like a
>>> cwnd of zero would perpetually place the association in a slow start state,
>>> which is silly but not illegal.  
>>>
>>
>> Hm, Good suggestions. Ok, I will try it again and find the root cause.
>> Thanks!
> 
> It's really simple.  sctp_transport_burst_limited() should simply do
> nothing if max_burst is 0, essentially allowing unlimited bursts.
> 
> -vlad
> 

I will add the a check of max_burst, if max_burst is 0, just do nothing. Michael
point out that it just disable max_burst which declared in rfc6458#section-8.1.24
as well.

Thanks.

>>
>>> Please investigate the acutally root cause of the problem before just avoiding
>>> it like this.
>>>
>>> Thanks!
>>> Neil
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>>
>>
>>
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

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

* [PATCH] sctp: disable max_burst when the max_burst is 0
  2013-12-02 13:08   ` Michael Tuexen
@ 2013-12-03  6:30     ` Wang Weidong
  2013-12-04  8:57       ` Daniel Borkmann
  0 siblings, 1 reply; 13+ messages in thread
From: Wang Weidong @ 2013-12-03  6:30 UTC (permalink / raw)
  To: David Miller, Neil Horman, Vlad Yasevich
  Cc: Michael Tuexen, linux-sctp, netdev, dingtianhong

As Michael pointed out that when max_burst is 0, it just disable
max_burst. It declared in rfc6458#section-8.1.24. so add the check
in sctp_transport_burst_limited, when it 0, just do nothing.

Suggested-by: Vlad Yasevich <vyasevich@gmail.com>
Suggested-by: Michael Tuexen <Michael.Tuexen@lurchi.franken.de>
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
---
 net/sctp/transport.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index e332efb..e580e34 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -573,7 +573,8 @@ void sctp_transport_burst_limited(struct sctp_transport *t)
 	u32 old_cwnd = t->cwnd;
 	u32 max_burst_bytes;
 
-	if (t->burst_limited)
+	/* if the max_burst is 0, do notihing */
+	if (t->burst_limited || !asoc->max_burst)
 		return;
 
 	max_burst_bytes = t->flight_size + (asoc->max_burst * asoc->pathmtu);
-- 
1.7.12

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

* Re: [PATCH] sctp: disable max_burst when the max_burst is 0
  2013-12-03  6:30     ` [PATCH] sctp: disable max_burst when the max_burst is 0 Wang Weidong
@ 2013-12-04  8:57       ` Daniel Borkmann
  2013-12-04  9:16         ` Wang Weidong
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel Borkmann @ 2013-12-04  8:57 UTC (permalink / raw)
  To: Wang Weidong
  Cc: David Miller, Neil Horman, Vlad Yasevich, Michael Tuexen,
	linux-sctp, netdev, dingtianhong

On 12/03/2013 07:30 AM, Wang Weidong wrote:
> As Michael pointed out that when max_burst is 0, it just disable
> max_burst. It declared in rfc6458#section-8.1.24. so add the check
> in sctp_transport_burst_limited, when it 0, just do nothing.
>
> Suggested-by: Vlad Yasevich <vyasevich@gmail.com>
> Suggested-by: Michael Tuexen <Michael.Tuexen@lurchi.franken.de>
> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
> ---
>   net/sctp/transport.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/sctp/transport.c b/net/sctp/transport.c
> index e332efb..e580e34 100644
> --- a/net/sctp/transport.c
> +++ b/net/sctp/transport.c
> @@ -573,7 +573,8 @@ void sctp_transport_burst_limited(struct sctp_transport *t)
>   	u32 old_cwnd = t->cwnd;
>   	u32 max_burst_bytes;
>
> -	if (t->burst_limited)
> +	/* if the max_burst is 0, do notihing */
> +	if (t->burst_limited || !asoc->max_burst)
>   		return;

Minor nitpick ... you can remove the comment as it contains a typo and
basically says what the code is doing anyway, so you could instead make
the code a bit more clear for readers e.g. "asoc->max_burst == 0".

>   	max_burst_bytes = t->flight_size + (asoc->max_burst * asoc->pathmtu);
>

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

* Re: [PATCH] sctp: disable max_burst when the max_burst is 0
  2013-12-04  8:57       ` Daniel Borkmann
@ 2013-12-04  9:16         ` Wang Weidong
  0 siblings, 0 replies; 13+ messages in thread
From: Wang Weidong @ 2013-12-04  9:16 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: David Miller, Neil Horman, Vlad Yasevich, Michael Tuexen,
	linux-sctp, netdev, dingtianhong

On 2013/12/4 16:57, Daniel Borkmann wrote:
> On 12/03/2013 07:30 AM, Wang Weidong wrote:
>> As Michael pointed out that when max_burst is 0, it just disable
>> max_burst. It declared in rfc6458#section-8.1.24. so add the check
>> in sctp_transport_burst_limited, when it 0, just do nothing.
>>
>> Suggested-by: Vlad Yasevich <vyasevich@gmail.com>
>> Suggested-by: Michael Tuexen <Michael.Tuexen@lurchi.franken.de>
>> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
>> ---
>>   net/sctp/transport.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/net/sctp/transport.c b/net/sctp/transport.c
>> index e332efb..e580e34 100644
>> --- a/net/sctp/transport.c
>> +++ b/net/sctp/transport.c
>> @@ -573,7 +573,8 @@ void sctp_transport_burst_limited(struct sctp_transport *t)
>>       u32 old_cwnd = t->cwnd;
>>       u32 max_burst_bytes;
>>
>> -    if (t->burst_limited)
>> +    /* if the max_burst is 0, do notihing */
>> +    if (t->burst_limited || !asoc->max_burst)
>>           return;
> 
> Minor nitpick ... you can remove the comment as it contains a typo and
> basically says what the code is doing anyway, so you could instead make
> the code a bit more clear for readers e.g. "asoc->max_burst == 0".
> 
Nice, Thanks for pointing it out for me. I will fix it in v2.

Regards.

>>       max_burst_bytes = t->flight_size + (asoc->max_burst * asoc->pathmtu);
>>
> 
> .
> 

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

* [PATCH v2] sctp: disable max_burst when the max_burst is 0
  2013-12-02  6:51 [PATCH] sctp: make the max_burst min value to 1 Wang Weidong
  2013-12-02 11:56 ` Neil Horman
@ 2013-12-04  9:32 ` Wang Weidong
  2013-12-04 11:45   ` Neil Horman
                     ` (2 more replies)
  1 sibling, 3 replies; 13+ messages in thread
From: Wang Weidong @ 2013-12-04  9:32 UTC (permalink / raw)
  To: Vlad Yasevich, nhorman, David Miller; +Cc: linux-sctp, netdev, Daniel Borkmann

As Michael pointed out that when max_burst is 0, it just disable
max_burst. It declared in rfc6458#section-8.1.24. so add the check
in sctp_transport_burst_limited, when it 0, just do nothing.

Reviewed-by: Daniel Borkmann <dborkman@redhat.com>
Suggested-by: Vlad Yasevich <vyasevich@gmail.com>
Suggested-by: Michael Tuexen <Michael.Tuexen@lurchi.franken.de>
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
---
 net/sctp/transport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index e332efb..efc46ff 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -573,7 +573,7 @@ void sctp_transport_burst_limited(struct sctp_transport *t)
 	u32 old_cwnd = t->cwnd;
 	u32 max_burst_bytes;
 
-	if (t->burst_limited)
+	if (t->burst_limited || asoc->max_burst == 0)
 		return;
 
 	max_burst_bytes = t->flight_size + (asoc->max_burst * asoc->pathmtu);
-- 
1.7.12

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

* Re: [PATCH v2] sctp: disable max_burst when the max_burst is 0
  2013-12-04  9:32 ` [PATCH v2] " Wang Weidong
@ 2013-12-04 11:45   ` Neil Horman
  2013-12-04 14:28   ` Vlad Yasevich
  2013-12-06  1:56   ` David Miller
  2 siblings, 0 replies; 13+ messages in thread
From: Neil Horman @ 2013-12-04 11:45 UTC (permalink / raw)
  To: Wang Weidong
  Cc: Vlad Yasevich, David Miller, linux-sctp, netdev, Daniel Borkmann

On Wed, Dec 04, 2013 at 05:32:39PM +0800, Wang Weidong wrote:
> As Michael pointed out that when max_burst is 0, it just disable
> max_burst. It declared in rfc6458#section-8.1.24. so add the check
> in sctp_transport_burst_limited, when it 0, just do nothing.
> 
> Reviewed-by: Daniel Borkmann <dborkman@redhat.com>
> Suggested-by: Vlad Yasevich <vyasevich@gmail.com>
> Suggested-by: Michael Tuexen <Michael.Tuexen@lurchi.franken.de>
> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
> ---
>  net/sctp/transport.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/sctp/transport.c b/net/sctp/transport.c
> index e332efb..efc46ff 100644
> --- a/net/sctp/transport.c
> +++ b/net/sctp/transport.c
> @@ -573,7 +573,7 @@ void sctp_transport_burst_limited(struct sctp_transport *t)
>  	u32 old_cwnd = t->cwnd;
>  	u32 max_burst_bytes;
>  
> -	if (t->burst_limited)
> +	if (t->burst_limited || asoc->max_burst == 0)
>  		return;
>  
>  	max_burst_bytes = t->flight_size + (asoc->max_burst * asoc->pathmtu);
> -- 
> 1.7.12
> 
> 
> 
> 
Acked-by: Neil Horman <nhorman@tuxdriver.com>

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

* Re: [PATCH v2] sctp: disable max_burst when the max_burst is 0
  2013-12-04  9:32 ` [PATCH v2] " Wang Weidong
  2013-12-04 11:45   ` Neil Horman
@ 2013-12-04 14:28   ` Vlad Yasevich
  2013-12-06  1:56   ` David Miller
  2 siblings, 0 replies; 13+ messages in thread
From: Vlad Yasevich @ 2013-12-04 14:28 UTC (permalink / raw)
  To: Wang Weidong, nhorman, David Miller; +Cc: linux-sctp, netdev, Daniel Borkmann

On 12/04/2013 04:32 AM, Wang Weidong wrote:
> As Michael pointed out that when max_burst is 0, it just disable
> max_burst. It declared in rfc6458#section-8.1.24. so add the check
> in sctp_transport_burst_limited, when it 0, just do nothing.
> 
> Reviewed-by: Daniel Borkmann <dborkman@redhat.com>
> Suggested-by: Vlad Yasevich <vyasevich@gmail.com>
> Suggested-by: Michael Tuexen <Michael.Tuexen@lurchi.franken.de>
> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
> ---
>  net/sctp/transport.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/sctp/transport.c b/net/sctp/transport.c
> index e332efb..efc46ff 100644
> --- a/net/sctp/transport.c
> +++ b/net/sctp/transport.c
> @@ -573,7 +573,7 @@ void sctp_transport_burst_limited(struct sctp_transport *t)
>  	u32 old_cwnd = t->cwnd;
>  	u32 max_burst_bytes;
>  
> -	if (t->burst_limited)
> +	if (t->burst_limited || asoc->max_burst == 0)
>  		return;
>  
>  	max_burst_bytes = t->flight_size + (asoc->max_burst * asoc->pathmtu);
> 

Acked-by: Vlad Yasevich <vyasevich@gmail.com>

Thanks
-vlad

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

* Re: [PATCH v2] sctp: disable max_burst when the max_burst is 0
  2013-12-04  9:32 ` [PATCH v2] " Wang Weidong
  2013-12-04 11:45   ` Neil Horman
  2013-12-04 14:28   ` Vlad Yasevich
@ 2013-12-06  1:56   ` David Miller
  2 siblings, 0 replies; 13+ messages in thread
From: David Miller @ 2013-12-06  1:56 UTC (permalink / raw)
  To: wangweidong1; +Cc: vyasevich, nhorman, linux-sctp, netdev, dborkman

From: Wang Weidong <wangweidong1@huawei.com>
Date: Wed, 4 Dec 2013 17:32:39 +0800

> As Michael pointed out that when max_burst is 0, it just disable
> max_burst. It declared in rfc6458#section-8.1.24. so add the check
> in sctp_transport_burst_limited, when it 0, just do nothing.
> 
> Reviewed-by: Daniel Borkmann <dborkman@redhat.com>
> Suggested-by: Vlad Yasevich <vyasevich@gmail.com>
> Suggested-by: Michael Tuexen <Michael.Tuexen@lurchi.franken.de>
> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>

Applied, thank you.

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

end of thread, other threads:[~2013-12-06  1:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-02  6:51 [PATCH] sctp: make the max_burst min value to 1 Wang Weidong
2013-12-02 11:56 ` Neil Horman
2013-12-02 12:03   ` Wang Weidong
2013-12-02 14:51     ` Vlad Yasevich
2013-12-03  1:35       ` Wang Weidong
2013-12-02 13:08   ` Michael Tuexen
2013-12-03  6:30     ` [PATCH] sctp: disable max_burst when the max_burst is 0 Wang Weidong
2013-12-04  8:57       ` Daniel Borkmann
2013-12-04  9:16         ` Wang Weidong
2013-12-04  9:32 ` [PATCH v2] " Wang Weidong
2013-12-04 11:45   ` Neil Horman
2013-12-04 14:28   ` Vlad Yasevich
2013-12-06  1:56   ` 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).