Subject: Re: SCTP seems to lose its socket state.

From: Vlad Yasevich <[email-masked]>
Date: Mon, 16 Jun 2014 09:47:41 -0400

On 06/16/2014 04:40 AM, David Laight wrote:
> From: Vlad Yasevich
> ...
>> Yeah.  We do end up queuing a bit more commands. Need to see if
>> all them are necessary..
> 
> I wonder why commands get queued, rather than just actioned with
> an immediate function call?

I don't know precisely why this decision was make in the 2.5 days
(before my time).  If I had to guess, I'd say that it was simple
to do at the time to provide a kind of buffering of multiple
actions that resulted from processing of multiple chunks.

> I suspect it is steeped into the history of the code.
>

Yes, very much so.  There are some papers/presentations describing
the approach, but not the reasons fro why it was taken.

> All of the commands have to be (and are) actioned before any other
> packets (etc) can be processed otherwise there will be massive
> problems with the socket/association state.
> 
> Simply calling the functions is likely change the order of the
> actions - which might break things.
> OTOH direct calls would make it much easier to audit the sequences.
> 

I've been thinking for long time about how to change this, but it really
needs a very careful audit and implementation.

-vlad