All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: linux-sctp@vger.kernel.org
Subject: Re: [Lksctp-developers] [PATCH] sctp: Fix to handle SHUTDOWN in	SHUTDOWN-PENDING
Date: Sat, 11 Oct 2008 07:26:58 +0000	[thread overview]
Message-ID: <48F05542.6060307@cn.fujitsu.com> (raw)
In-Reply-To: <48EF54F4.2000507@hp.com>

Hi Vlad:

> Hi Wei
>
> If I can't take that without a patch that processes SHUTDOWN chunks in
> SHUTDOWN_RECEIVED state.
>
> The problem is that if B in your example has more data to send,
> it will ignore subsequent SHUTDOWN chunks.  If A uses only SHUTDOWNS
> to acknowledge data, then this would results us ignoring acks and
> retransmitting and eventually ABORTING the association.
>   

I think the current kernel has the same problem when process SHUTDOWN in 
ESTABLISHED state:

Endpoint A                       Endpoint B       ULP
(ESTABLISHED)                    (ESTABLISHED)

               <-----------      DATA (TSN=1)
               <-----------      DATA (TSN=2)
  SHUTDOWN(TSN=1) ------------>  enter SHUTDOWN-RECEIVED state
               <-----------      DATA (TSN=2)
  SACK(TSN=2)  ------------>
  SHUTDOWN(TSN=2) ------------>  discard

I have not test it, and check it later.

RFC4960 said:
   Once an endpoint has reached the SHUTDOWN-RECEIVED state, it MUST NOT
   send a SHUTDOWN in *response to a ULP request*, and should *discard*
   subsequent SHUTDOWN chunks.

So maybe the RFC is wrong, and we still need to process the SHUTDOWN 
chunk in
SHUTDOWN-RECEIVED state, or when we received SHUTDOWN, we only enter
SHUTDOWN-RECEIVED state if the TSN can ack all its outstanding DATA chunks.

Wei Yongjun

> -vlad
>
> Wei Yongjun wrote:
>   
>> If SHUTDOWN is received in SHUTDOWN-PENDING state, enpoint should enter
>> the SHUTDOWN-RECEIVED state and check the Cumulative TSN Ack field of
>> the SHUTDOWN chunk (RFC 4960 Section 9.2). If the SHUTDOWN chunk can
>> acknowledge all of the send DATA chunks, SHUTDOWN-ACK should be sent.
>>
>> But now endpoint just silently discarded the SHUTDOWN chunk.
>>
>> SHUTDOWN received in SHUTDOWN-PENDING state can happend when the last
>> SACK is lost by network, or the SHUTDOWN chunk can acknowledge all of
>> the received DATA chunks. The packet sequence(SACK lost) is like this:
>>
>> Endpoint A                       Endpoint B       ULP
>> (ESTABLISHED)                    (ESTABLISHED)
>>
>>                <-----------      DATA
>>                                              <--- shutdown
>>                                  Enter SHUTDOWN-PENDING state
>>   SACK         ----lost---->
>>
>>   SHUTDOWN(*1) ------------>
>>
>>                <-----------      SHUTDOWN-ACK
>>
>>  (*1) silently discarded now.
>>
>> This patch fix to handle SHUTDOWN in SHUTDOWN-PENDING state as the same
>> as ESTABLISHED state.
>>     

  reply	other threads:[~2008-10-11  7:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-10 13:13 [Lksctp-developers] [PATCH] sctp: Fix to handle SHUTDOWN in SHUTDOWN-PENDING Vlad Yasevich
2008-10-11  7:26 ` Wei Yongjun [this message]
2008-10-13  3:25 ` Wei Yongjun
2008-10-13  4:45 ` [Lksctp-developers] [PATCH] sctp: Fix to handle SHUTDOWN in SHUTDOWN-PENDING state Michael Tüxen
2008-10-14  0:30 ` [Lksctp-developers] [PATCH] sctp: Fix to handle SHUTDOWN in SHUTDOWN-PENDING Wei Yongjun
2008-10-14  5:37 ` [Lksctp-developers] [PATCH] sctp: Fix to handle SHUTDOWN in SHUTDOWN-PENDING state Michael Tüxen

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=48F05542.6060307@cn.fujitsu.com \
    --to=yjwei@cn.fujitsu.com \
    --cc=linux-sctp@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.