Re: [Tsvwg] SCTP stream EOF

Randy Stewart <randall@lakerest.net> Fri, 19 September 2008 17:38 UTC

Return-Path: <tsvwg-bounces@ietf.org>
X-Original-To: tsvwg-archive@optimus.ietf.org
Delivered-To: ietfarch-tsvwg-archive@core3.amsl.com
Received: from [127.0.0.1] (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 5B2FE3A6B83; Fri, 19 Sep 2008 10:38:36 -0700 (PDT)
X-Original-To: tsvwg@core3.amsl.com
Delivered-To: tsvwg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id C50333A6B86 for <tsvwg@core3.amsl.com>; Fri, 19 Sep 2008 10:38:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ys8SHaY3UjIt for <tsvwg@core3.amsl.com>; Fri, 19 Sep 2008 10:38:28 -0700 (PDT)
Received: from lakerest.net (unknown [IPv6:2001:240:585:2:203:6dff:fe1a:4ddc]) by core3.amsl.com (Postfix) with ESMTP id 974EF3A67BD for <tsvwg@ietf.org>; Fri, 19 Sep 2008 10:38:27 -0700 (PDT)
Received: from [10.1.1.54] ([10.1.1.54]) (authenticated bits=0) by lakerest.net (8.14.1/8.14.1) with ESMTP id m8JHcdNq091195 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 19 Sep 2008 13:38:39 -0400 (EDT) (envelope-from randall@lakerest.net)
DKIM-Signature: a=rsa-sha1; c=simple/simple; d=lakerest.net; s=mail; t=1221845920; h=Cc:Message-Id:From:To:In-Reply-To:Content-Type: Content-Transfer-Encoding:Mime-Version:Subject:Date:References: X-Mailer; b=qAJu+yzsi8d4G2ZDPqG3394uEjS1DZ9beLkjA8V/GF8tgR6ZhCdBaSJ ZnKD0nLYJKIXvfPOSahL4k/jB0DPyvg==
Message-Id: <38B80FA2-E873-462A-8D6B-DD4A94DACEF2@lakerest.net>
From: Randy Stewart <randall@lakerest.net>
To: Florian Niederbacher <florian.niederbacher@student.uibk.ac.at>
In-Reply-To: <48D11A2C.8020005@student.uibk.ac.at>
Content-Type: text/plain; charset="US-ASCII"; format="flowed"; delsp="yes"
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v929.2)
Date: Fri, 19 Sep 2008 13:38:39 -0400
References: <48D10AD3.10307@student.uibk.ac.at> <D914D831-188B-4194-835F-E2A6EDD495B3@lakerest.net> <48D11A2C.8020005@student.uibk.ac.at>
X-Mailer: Apple Mail (2.929.2)
Cc: tsvwg@ietf.org
Subject: Re: [Tsvwg] SCTP stream EOF
X-BeenThere: tsvwg@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Transport Area Working Group <tsvwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=unsubscribe>
List-Archive: <https://www.ietf.org/mailman/private/tsvwg>
List-Post: <mailto:tsvwg@ietf.org>
List-Help: <mailto:tsvwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=subscribe>
Sender: tsvwg-bounces@ietf.org
Errors-To: tsvwg-bounces@ietf.org

On Sep 17, 2008, at 10:54 AM, Florian Niederbacher wrote:

> Randy Stewart schrieb:
>> Florian:
>>
>> What do you mean by an EOF?
> Same as EOF for files. That blocking recv and recvmsg can be stopped.
>>
>> For messages there is a SCTP_EOR to tell you a "message" as ended.
> Yes, but only for message you pick up from recv- buffer if I  
> interpret it right from socket_api-spec.
> E.g. transfer Hello in to messages hel - lo. After 'lo' I get an EOF.
> SCTP_EOR does only indicate that the message can be read in full in  
> one read/recv, or not? Because i get always SCTP_EOR in my app, only  
> if the messagesize is bigger then the buffer for recv\recv_msg.

If I have a recv buffer of 2 bytes and you send me "hello\n"
I would get
read (he - no eor)
read (ll - no eor)
read (o\n - EOR)

It depends on your read size...



>
>>
>>
>> If you were using stream reset, and the peer decides to "reset" a  
>> stream
>> and then use the stream for some other purpose (this is what I  
>> think you
>> are stating).... then the user would get a STREAM_RESET event for  
>> that
>> stream.
>>
>> I don't see the difference (other than name) in stream-x has been  
>> reset
>> vs stream X receives a EOF. Note that an app MAY choose to use a  
>> RESET
>> as a EOF.. but it can also mean something different to an app.. I  
>> am done
>> sending this type of message, I will now send other types of  
>> messages.
>> Which is different than an EOF....
> Yes I agree. I didn't know that STREAM_RESET is handled as event.  
> This would definitely solve my case. But is this already implemented  
> in LKSCTP?
>


We have it in FreeBSD but we as yet do not support adding more  
streams.. another
thing I need to add :)

I don't know about LKSCTP at the last interop they did not support it

R

>>
>> Note also that the socket-api section is still missing (if I  
>> remember right) from
>> the stream-reconfig draft... I do need to add this. But I really  
>> think
>> the Stream-Reset serves the purpose you are looking for.
>>
>> R
>> On Sep 17, 2008, at 9:49 AM, Florian Niederbacher wrote:
>>
>>> Hi,
>>> I would ask what are you thinking about a definition for an EOF on  
>>> streams in SCTP. My problem is that I would need a signaling  
>>> method to report an EOF without closing the whole SCTP  
>>> association. If I am right, socket connections get only an EOF if  
>>> the connection will be closed (no sending of EOF on socktes in  
>>> another way is possible). In draft-stewart-tsvwg-sctpstrrst-00 the  
>>> possibility the reset of streams is discussed. This would also be  
>>> a solution if you can check the numbering sequence in User Space.
>>> A proposal would be to generate an SCTP_EVENT e.g. SCTP_STREAM_EOF  
>>> to signal EOF on streams. In this way you can stop receiving and  
>>> also reuse the stream or at least continue in multi-streamed  
>>> network applications, if you use different threads or processes  
>>> for the receiving procedure on streams. Maybe an other possibility  
>>> exists to signal an EOF on SCTP streams, but at the moment I can't  
>>> find any solution to deal with this problem. What are your  
>>> proposals and comments?
>>>
>>> Best regards
>>> Florian Niederbacher
>>
>> -----
>> Randall Stewart
>> randall@lakerest.net
>>
>>
>>
>>
>>
>
> - Regards Florian
>

-----
Randall Stewart
randall@lakerest.net