Subject: PR-SCTP

From: Anders Torger <[email-masked]>
Date: Tue, 24 Apr 2007 15:23:05 +0200

Is there an intention to specify an API for PR-SCTP in the sockets API 
draft?

Now it seems that there is specified support on the receive side 
(through the SCTP_PARTIAL_DELIVERY_EVENT), but not on the sending side.

/Anders Torger

---

From: Randall Stewart <[email-masked]>
Date: Tue, 24 Apr 2007 09:46:58 -0400

> (through the SCTP_PARTIAL_DELIVERY_EVENT), but not on the sending side.
Drats.. I thought we had put the PR_XXX flags in..

Hmm .. Michael, we need to document your nifty way of
doing this..

R

-- 
Randall Stewart
NSSTG - Cisco Systems Inc.
803-345-0369 <or> 803-317-4952 (cell)

---

From: Vlad Yasevich <[email-masked]>
Date: Tue, 24 Apr 2007 09:49:28 -0400

> (through the SCTP_PARTIAL_DELIVERY_EVENT), but not on the sending side.

The sending side uses timetolive (sinfo_timetolive) and will notify the 
app using SEND_FAILED event in case the message was not sent/received in 
time.  At least that's what Linux does.

-vlad

---

From: Anders Torger <[email-masked]>
Date: Tue, 24 Apr 2007 16:20:26 +0200

I figured that out, but there seems to be a global enable flag for 
PR-SCTP (proc/sys/net/sctp/prsctp_enable), you cannot choose per 
message if it should be partially reliable or not.

In Solaris there is the SCTP_PRSCTP socket option, and the MSG_PR_SCTP 
flag so one can choose if the time-to-live member should count only 
until the message hits the wire or if it should be partial reliable.

These flags are however not discussed in the current socket API draft.

/Anders Torger

On Tuesday 24 April 2007 15:49, Vlad Yasevich wrote:
> Anders Torger wrote:
> > Is there an intention to specify an API for PR-SCTP in the sockets
> > API draft?
> >
> The sending side uses timetolive (sinfo_timetolive) and will notify
> the app using SEND_FAILED event in case the message was not
> sent/received in time.  At least that's what Linux does.
>
> -vlad
>
> > /Anders Torger

---

From: Randall Stewart <[email-masked]>
Date: Tue, 24 Apr 2007 10:57:54 -0400

> time.  At least that's what Linux does.
We do the same, but Michael T developed a specific macro set you
apply to
sinfo_flags
to set the profile type.

Its kinda cool :-D

R

---

From: Randall Stewart <[email-masked]>
Date: Tue, 24 Apr 2007 10:59:01 -0400

> until the message hits the wire or if it should be partial reliable.

This is what we do too I think.. you must have the option on before
the t-t-l is considered.. of course we have two other modes..

number of retransmissions
and
buffer based.

R

---

From: Vlad Yasevich <[email-masked]>
Date: Tue, 24 Apr 2007 12:45:53 -0400

Anders

> message if it should be partially reliable or not.

In Linux, this flag is a global enable/disable flag for PR-SCTP.  If
that setting is off, PR extensions are disabled in the code and
sinfo_timetolive will be ignored.

> until the message hits the wire or if it should be partial reliable.

Ahh..  linux just treats any message with sinfo_timetolive as partially reliable
if the partial reliability is turned on.

-vlad

---

From: Anders Torger <[email-masked]>
Date: Wed, 25 Apr 2007 08:50:37 +0200

> sinfo_timetolive will be ignored.

If I understand things correctly, the sinfo_timetolive should not be 
ignored even when PR-SCTP is not enabled. The meaning of it is changed 
though, the timer only runs while the message is in the kernel send 
buffer and has not yet been put on the wire (for the first time). As 
soon as the message is put on the wire the first time, the timer is 
dropped.

But should the timer expire and the message has not yet been put on the 
wire, most likely due to a stall caused by congestion or peer flow 
control, the message is dropped and a SCTP_SEND_FAILED notification is 
delivered (if subscribed to).

The difference with PR-SCTP enabled is that the timer continues to run 
even when the message has been sent, and thus if it has to be 
retransmitted due to packet loss it will instead be dropped if the 
timer expires.

/Anders Torger

---

From: "Sridhar Samudrala" <[email-masked]>
Date: Wed, 25 Apr 2007 16:34:56 -0700

> retransmitted due to packet loss it will instead be dropped if the

This is correct and this is how i interpreted sinfo_timetolive to work
when i implemented PR-SCTP on linux.
However, the implementation  is little different.  We don't maintain a
timer for each message. Instead, we have a value 'expires_at'  associated
with each message and use this value to determine if the message is
still eligible to be sent whenever it is considered. When PR-SCTP is
disabled, the check for expires_at is no longer done once it is put on
the wire.

Thanks
Sridhar