Subject: Re: Head of Line (HOL) blocking question

From: Randall Stewart <[email-masked]>
Date: Tue, 04 Oct 2005 14:50:16 -0400

Leslie:

Comments in line...

[email-masked] wrote:
>  
> Hi, all
>  
> SCTP claim to eliminate Head of Line (HOL) blocking issue using 
> multi-streaming. But I think Head of Line (HOL) blocking issue is still 
> existing in one stream since message transmission is still ordered in 
> one stream. It can only eliminate HOL blocking issue among the different 
> stream, but can not handle HOL blocking issue within one stream. Am I 
> right?  

Yes, and this is by design. You use the streams to eliminate
the HOL in an application that you do not want.. However there
are other types of HOL blocking that you DO want within an
application. A classic one is a phone call.. you want
YOUR call to have HOL blocking with respect to all messages
sent about it... On the other hand you DON'T want YOUR
call to have HOL with respect to MY phone call.

So you want your
1) setup
2) answer
3) hangup
messages to be processed in the correct order
but you don't want my same set of messages to block any
of yours.. so you put YOUR messages on stream 1, and mine
on stream 2.. and we escape the problem but still keep
the "good HOL" that we want.

If you want to altogether have NO HOL at all on any stream
then you send things un-ordered.. and they will be delivered
always without delay relative to the stream its in or any other
stream...

>  
> Another question. Currently I have a SIP over UDP implementation. If I 
> want to implement SIP over SCTP in Solaris 10 which integrates SCTP 
> stack, will it take much time? Is it done if just change UDP socket to 
> SCTP socket? Is there any other big issues I don't know?

Well.. it depends... I am not to familiar with what parts
of the socket API that solaris 10 implemented..

If they did the 1-2-many model and support the autoclose feature, then
you could easily just open a 1-2-many type socket. Turn on autoclose
to some pre-selected value (say 60 seconds).. and then the
UDP interface that you currently are using would begin
using SCTP...

If you want inbound connections you would also need to do
a listen() as well... but that like the autoclose would
be a one time at setup socketopt.. put it in where
the socket() call is and your done :-D

If you did not care about message order, you could set the default
send options (assuming that solaris implemented it.. and I would
imagine Kacheong did this) so that you are default sending un-ordered.

If you want to escape HOL and still preserve some HOL for specific
calls then you must go in and change the send call to actually
use sctp_send or sctp_sendmsg  so that you can specify a stream
number to put things in...

> If I want to implement SIP over TCP, will it take much time? Is it done 
> if just change UDP socket to TCP socket? Is there any other big issues I 
> don't know?
This would be harder, assuming it is on UDP now. In UDP you just
send and receive.. not so in TCP... since you must do accept/connect
and listen... i.e. the application must become aware of the
transport state.. and you cannot send until the connection is
either accepted or connected...

This is why SCTP has two models.. one will align real easily
with the TCP model (the one 2 one socket) the other will
align real easily with the UDP model (the one 2 many socket).

For further details look at the current Unix Network Programming
3rd edition.. it has some chapters on SCTP that are helpful..

Hope that helps

R

> Thanks
> Regards
> Leslie ( Wang Qi )
> Tel:   +86-21-24057046
> Fax:  +86-21-24057313

-- 
Randall Stewart
ITD - Cisco Systems Inc.
803-345-0369 <or> 815-342-5222 (cell)