Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-08-02 Thread xufeng zhang
On 08/03/2012 05:17 AM, Vlad Yasevich wrote: On 07/31/2012 02:51 AM, xufeng zhang wrote: Sorry, please ignore the above patch, there was an paste error. Please check the following patch. I'm wondering if the below solution is fine to you which is base

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-08-02 Thread Vlad Yasevich
On 07/31/2012 02:51 AM, xufeng zhang wrote: Sorry, please ignore the above patch, there was an paste error. Please check the following patch. I'm wondering if the below solution is fine to you which is based on your changes. BTW, I have verified this p

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-30 Thread xufeng zhang
Sorry, please ignore the above patch, there was an paste error. Please check the following patch. I'm wondering if the below solution is fine to you which is based on your changes. BTW, I have verified this patch and it works ok for all the situation, b

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-30 Thread Xufeng Zhang
I'm wondering if the below solution is fine to you which is based on your changes. BTW, I have verified this patch and it works ok for all the situation, but only one problem persists: there is a potential that commands will exceeds SCTP_MAX_NUM_COMMANDS which happens during sending lots of small e

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-29 Thread Xufeng Zhang
On 7/30/12, Xufeng Zhang wrote: > On 7/28/12, Vlad Yasevich wrote: >> here is an untested prototype of what I was talking about. This should >> handle multiple data chunks. > > Yes, it works if only the end of the DATA chunk in a packet has > invalid stream identifier > and I have verified this

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-29 Thread Xufeng Zhang
On 7/28/12, Vlad Yasevich wrote: > here is an untested prototype of what I was talking about. This should > handle multiple data chunks. Yes, it works if only the end of the DATA chunk in a packet has invalid stream identifier and I have verified this patch by my test case, but what happens if t

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-27 Thread Vlad Yasevich
here is an untested prototype of what I was talking about. This should handle multiple data chunks. -vlad --- include/net/sctp/command.h |1 + net/sctp/sm_sideeffect.c | 22 ++ net/sctp/sm_statefuns.c| 18 ++ 3 files changed, 33 insertions(+),

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-25 Thread Xufeng Zhang
On 7/26/12, Vlad Yasevich wrote: > Xufeng Zhang wrote: > >>On 7/26/12, Xufeng Zhang wrote: >>> On 7/25/12, Vlad Yasevich wrote: > And after take a moment to look into the relative codes, I think we > can implement it > by below way: > 1). Add a flag(isi_err_needed) in the embedd

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-25 Thread Vlad Yasevich
Xufeng Zhang wrote: >On 7/26/12, Xufeng Zhang wrote: >> On 7/25/12, Vlad Yasevich wrote: And after take a moment to look into the relative codes, I think we can implement it by below way: 1). Add a flag(isi_err_needed) in the embedded struct peer of >struct struct sctp_

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-25 Thread Xufeng Zhang
On 7/26/12, Xufeng Zhang wrote: > On 7/25/12, Vlad Yasevich wrote: >>> And after take a moment to look into the relative codes, I think we >>> can implement it >>> by below way: >>> 1). Add a flag(isi_err_needed) in the embedded struct peer of struct >>> struct sctp_association >>> just like sack

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-25 Thread Vlad Yasevich
Xufeng Zhang wrote: >On 7/25/12, Vlad Yasevich wrote: >>> And after take a moment to look into the relative codes, I think we >>> can implement it >>> by below way: >>> 1). Add a flag(isi_err_needed) in the embedded struct peer of struct >>> struct sctp_association >>> just like sack_needed flag

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-25 Thread Xufeng Zhang
On 7/25/12, Neil Horman wrote: > On Wed, Jul 25, 2012 at 05:22:19PM +0800, Xufeng Zhang wrote: >> On 7/25/12, Xufeng Zhang wrote: >> > On 7/25/12, Vlad Yasevich wrote: >> >> >> >> Actually not true. AUTH can be before SACK. So can any addip chunks >> >> that >> >> aid in locating an associatio

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-25 Thread Xufeng Zhang
On 7/25/12, Vlad Yasevich wrote: >> And after take a moment to look into the relative codes, I think we >> can implement it >> by below way: >> 1). Add a flag(isi_err_needed) in the embedded struct peer of struct >> struct sctp_association >> just like sack_needed flag. >> 2). When "invalid stream

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-25 Thread Vlad Yasevich
On 07/25/2012 05:22 AM, Xufeng Zhang wrote: On 7/25/12, Xufeng Zhang wrote: On 7/25/12, Vlad Yasevich wrote: Actually not true. AUTH can be before SACK. So can any addip chunks that aid in locating an association. Now AUTH isn't a big issue since its autogenerated to the packet but ADDIP

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-25 Thread Neil Horman
On Wed, Jul 25, 2012 at 05:22:19PM +0800, Xufeng Zhang wrote: > On 7/25/12, Xufeng Zhang wrote: > > On 7/25/12, Vlad Yasevich wrote: > >> > >> Actually not true. AUTH can be before SACK. So can any addip chunks > >> that > >> aid in locating an association. > >> > >> Now AUTH isn't a big issue

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-25 Thread Neil Horman
On Wed, Jul 25, 2012 at 10:34:32AM +0800, Xufeng Zhang wrote: > On 7/24/12, Neil Horman wrote: > > On Tue, Jul 24, 2012 at 09:50:18AM +0800, xufeng zhang wrote: > >> On 07/23/2012 08:14 PM, Neil Horman wrote: > >> >On Mon, Jul 23, 2012 at 10:30:34AM +0800, xufeng zhang wrote: > >> >>On 07/23/2012

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-25 Thread Xufeng Zhang
On 7/25/12, Xufeng Zhang wrote: > On 7/25/12, Vlad Yasevich wrote: >> >> Actually not true. AUTH can be before SACK. So can any addip chunks >> that >> aid in locating an association. >> >> Now AUTH isn't a big issue since its autogenerated to the packet but >> ADDIP >> is since it could be que

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-25 Thread Xufeng Zhang
On 7/25/12, Vlad Yasevich wrote: > > Actually not true. AUTH can be before SACK. So can any addip chunks that > aid in locating an association. > > Now AUTH isn't a big issue since its autogenerated to the packet but ADDIP > is since it could be queued up for retransmission. > > There could be o

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-25 Thread Vlad Yasevich
Xufeng Zhang wrote: >On 7/24/12, Vlad Yasevich wrote: > And I should clarify the above judgment code. > AFAIK, there should be two cases for the bundling when invalid >>>stream > identifier error happens: > 1). COOKIE_ACK ERROR SACK > 2). ERROR SACK > So I need to deal wi

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-24 Thread Xufeng Zhang
On 7/24/12, Neil Horman wrote: > On Tue, Jul 24, 2012 at 09:50:18AM +0800, xufeng zhang wrote: >> On 07/23/2012 08:14 PM, Neil Horman wrote: >> >On Mon, Jul 23, 2012 at 10:30:34AM +0800, xufeng zhang wrote: >> >>On 07/23/2012 08:49 AM, Neil Horman wrote: >> >>>Not sure I understand how you came in

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-24 Thread Xufeng Zhang
On 7/24/12, Vlad Yasevich wrote: And I should clarify the above judgment code. AFAIK, there should be two cases for the bundling when invalid >>stream identifier error happens: 1). COOKIE_ACK ERROR SACK 2). ERROR SACK So I need to deal with the two cases differently.

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-24 Thread Vlad Yasevich
xufeng zhang wrote: >On 07/24/2012 10:27 AM, Vlad Yasevich wrote: >> xufeng zhang wrote: >> >> >>> On 07/19/2012 01:57 PM, xufengzhang.m...@gmail.com wrote: >>> When "Invalid Stream Identifier" ERROR happens after process the received DATA chunks, this ERROR chunk is enqueued

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-24 Thread Neil Horman
On Tue, Jul 24, 2012 at 09:50:18AM +0800, xufeng zhang wrote: > On 07/23/2012 08:14 PM, Neil Horman wrote: > >On Mon, Jul 23, 2012 at 10:30:34AM +0800, xufeng zhang wrote: > >>On 07/23/2012 08:49 AM, Neil Horman wrote: > >>>Not sure I understand how you came into this error. If we get an invalid >

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-23 Thread xufeng zhang
On 07/24/2012 10:27 AM, Vlad Yasevich wrote: xufeng zhang wrote: On 07/19/2012 01:57 PM, xufengzhang.m...@gmail.com wrote: When "Invalid Stream Identifier" ERROR happens after process the received DATA chunks, this ERROR chunk is enqueued into outqueue before SACK chunk, so when bun

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-23 Thread Vlad Yasevich
xufeng zhang wrote: >On 07/19/2012 01:57 PM, xufengzhang.m...@gmail.com wrote: >> When "Invalid Stream Identifier" ERROR happens after process the >> received DATA chunks, this ERROR chunk is enqueued into outqueue >> before SACK chunk, so when bundling ERROR chunk with SACK chunk, >> the ERROR c

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-23 Thread Xufeng Zhang
On 7/23/12, Neil Horman wrote: > On Mon, Jul 23, 2012 at 10:30:34AM +0800, xufeng zhang wrote: >> On 07/23/2012 08:49 AM, Neil Horman wrote: >> > >> >Not sure I understand how you came into this error. If we get an >> > invalid >> >stream, we issue an SCTP_REPORT_TSN side effect, followed by an >

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-23 Thread Neil Horman
On Mon, Jul 23, 2012 at 10:30:34AM +0800, xufeng zhang wrote: > On 07/23/2012 08:49 AM, Neil Horman wrote: > > > >Not sure I understand how you came into this error. If we get an invalid > >stream, we issue an SCTP_REPORT_TSN side effect, followed by an > >SCTP_CMD_REPLY > >which sends the error

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-22 Thread xufeng zhang
On 07/19/2012 01:57 PM, xufengzhang.m...@gmail.com wrote: When "Invalid Stream Identifier" ERROR happens after process the received DATA chunks, this ERROR chunk is enqueued into outqueue before SACK chunk, so when bundling ERROR chunk with SACK chunk, the ERROR chunk is always placed first in th

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-22 Thread xufeng zhang
On 07/23/2012 08:49 AM, Neil Horman wrote: Not sure I understand how you came into this error. If we get an invalid stream, we issue an SCTP_REPORT_TSN side effect, followed by an SCTP_CMD_REPLY which sends the error chunk. The reply goes through sctp_outq_tail->sctp_outq_chunk->sctp_outq_tran

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-22 Thread Neil Horman
On Thu, Jul 19, 2012 at 01:57:30PM +0800, xufengzhang.m...@gmail.com wrote: > When "Invalid Stream Identifier" ERROR happens after process the > received DATA chunks, this ERROR chunk is enqueued into outqueue > before SACK chunk, so when bundling ERROR chunk with SACK chunk, > the ERROR chunk is a

Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-22 Thread David Miller
From: Date: Thu, 19 Jul 2012 13:57:30 +0800 > When "Invalid Stream Identifier" ERROR happens after process the > received DATA chunks, this ERROR chunk is enqueued into outqueue > before SACK chunk, so when bundling ERROR chunk with SACK chunk, > the ERROR chunk is always placed first in the pack

[PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling

2012-07-18 Thread xufengzhang.main
When "Invalid Stream Identifier" ERROR happens after process the received DATA chunks, this ERROR chunk is enqueued into outqueue before SACK chunk, so when bundling ERROR chunk with SACK chunk, the ERROR chunk is always placed first in the packet because of the chunk's position in the outqueue. Th