From: Vlad Yasevich <vyasevich@gmail.com>
To: Xufeng Zhang <xufengzhang.main@gmail.com>
Cc: Neil Horman <nhorman@tuxdriver.com>,
xufeng zhang <xufeng.zhang@windriver.com>,
sri@us.ibm.com, davem@davemloft.net, linux-sctp@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sctp: Make "Invalid Stream Identifier" ERROR follows SACK when bundling
Date: Wed, 25 Jul 2012 22:55:05 -0400 [thread overview]
Message-ID: <8ea83e51-81d1-407a-be06-98d2c99c876d@email.android.com> (raw)
In-Reply-To: <CA+=dFziK09TVcK29x1SLg+JanOj6o__bJKf8yohw6dTYCUCF5A@mail.gmail.com>
Xufeng Zhang <xufengzhang.main@gmail.com> wrote:
>On 7/26/12, Xufeng Zhang <xufengzhang.main@gmail.com> wrote:
>> On 7/25/12, Vlad Yasevich <vyasevich@gmail.com> 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 identifier" ERROR happens in
>sctp_eat_data()
>>>> function, we just
>>>> set isi_err_needed flag and don't create ERROR chunk and also don't
>>>> insert SCTP_CMD_REPLY command.
>>>> 3). In sctp_gen_sack() function, we create ERROR chunk and also
>insert
>>>> SCTP_CMD_REPLY command if isi_err_needed flag is set.
>>>>
>>>> Is this way proper?
>>>>
>>>
>>> So, I looked at the code, and it looks very simple to do. We
>already
>>> return a specific status from sctp_eat_data() when the error was
>>> generated. All you have to do is take the code that generates the
>error
>>> and adds it to the command list and give it its own small function
>that
>>> you can then call if SCTP_IERROR_BAD_STREAM error was returned.
>>
>> No, it will still has the same problem by just doing this.
>> SCTP_CMD_GEN_SACK command actually don't enqueue SACK to outqueue,
>> sctp_gen_sack() do this things when processing SCTP_CMD_GEN_SACK
>command
>> in sctp_cmd_interpreter().
>> So it's not enough if we just insert SCTP_ERROR_INV_STRM command
>after
>> sctp_eat_data() return SCTP_IERROR_BAD_STREAM in
>sctp_sf_eat_data_6_2().
>
>Yes, I just tried this way, SACK is still bundled after ERROR chunk.
>But I think my above method is also not fine if there are multiple
>error DATA chunks
>bundled in a packet.
>Really awesome!
1. Catch the error return.
2. Set flag indicating error is needed.
3. Queue sack as needed.
4. If error flag set call new function to queue error chunk.
That should fix things. Do this in all callers of sctp_eat_data.
-vlad
>
>
>Thanks,
>Xufeng Zhang
>
>>
>>
>>
>> Thanks,
>> Xufeng Zhang
>>
>>>
>>> -vlad
>>>
>>>>
>>>> Thanks,
>>>> Xufeng Zhang
>>>>>
>>>>>
>>>>>
>>>>> Thanks,
>>>>> Xufeng Zhang
>>>>>>
>>>>>> -vlad
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Xufeng Zhang
>>>>>>>>
>>>>>>>> -vlad
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sent from my Android phone with SkitMail. Please excuse my
>brevity.
>>>>>>
>>>>>
>>>
>>>
>>>
>>
--
Sent from my Android phone with SkitMail. Please excuse my brevity.
next prev parent reply other threads:[~2012-07-26 2:55 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-19 5:57 xufengzhang.main
2012-07-22 19:45 ` David Miller
2012-07-23 0:49 ` Neil Horman
2012-07-23 2:30 ` xufeng zhang
2012-07-23 12:14 ` Neil Horman
2012-07-24 1:53 ` Xufeng Zhang
[not found] ` <500DFF5A.20203@windriver.com>
2012-07-24 11:38 ` Neil Horman
2012-07-25 2:34 ` Xufeng Zhang
2012-07-25 11:15 ` Neil Horman
2012-07-23 5:16 ` xufeng zhang
2012-07-24 2:27 ` Vlad Yasevich
2012-07-24 3:02 ` xufeng zhang
2012-07-24 14:05 ` Vlad Yasevich
2012-07-25 2:28 ` Xufeng Zhang
2012-07-25 7:16 ` Vlad Yasevich
2012-07-25 8:05 ` Xufeng Zhang
2012-07-25 9:22 ` Xufeng Zhang
2012-07-25 11:27 ` Neil Horman
2012-07-26 1:34 ` Xufeng Zhang
2012-07-25 15:00 ` Vlad Yasevich
2012-07-26 1:30 ` Xufeng Zhang
2012-07-26 2:45 ` Vlad Yasevich
2012-07-26 2:50 ` Xufeng Zhang
2012-07-26 2:55 ` Vlad Yasevich [this message]
2012-07-26 3:12 ` Xufeng Zhang
2012-07-27 21:22 ` Vlad Yasevich
2012-07-30 4:58 ` Xufeng Zhang
2012-07-30 5:47 ` Xufeng Zhang
2012-07-31 6:17 ` Xufeng Zhang
2012-07-31 6:51 ` xufeng zhang
2012-08-02 21:17 ` Vlad Yasevich
2012-08-03 2:24 ` xufeng zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8ea83e51-81d1-407a-be06-98d2c99c876d@email.android.com \
--to=vyasevich@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=sri@us.ibm.com \
--cc=xufeng.zhang@windriver.com \
--cc=xufengzhang.main@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome