Subject: Thoughts on implementing sctp_connectx()

From: Frank Filz <[email-masked]>
Date: Thu, 12 May 2005 09:42:23 -0700

Looks like I can post now.

I'm working on an implementation of sctp_connectx() for the Linux lksctp
project and have a questions and thoughts on timeouts and retries.

My question is how to interpret MAX INIT ATTEMPTS. One thought is that
this should be the maximum number of INITs sent to all addresses (so if
two addresses were used, and max was 8, 4 INITs would be sent to each
address). Another thought is that it is the max per address.

My implementation is sending one INIT at a time. It only doubles the
timeout after one INIT has been sent to each address. If an address
sends an ABORT, the address is removed from consideration, and an INIT
is sent to the next address immediately (without waiting for a timeout).

The first interpretation of the maximum would seem to give the most
control, however, if more than two or three addresses were provided, the
default of 8 might not provide a long enough retry time (though the
default results in about a 4 minute total retry time - perhaps plenty
long enough), and with more than 8 addresses, not all will even be
tried. The second interpretation makes sure each address is tried a
known number of times (unless it results in an ABORT), but with many
addresses, the total time could get rather long.

No matter the solution, it seems like applications that use connectx
will need to consider adjusting the retry parameters.

I also considered sending INITs simultaneously to all addresses, but
that would seem to produce a lot of wasteful network traffic if most
addresses are good, though if the different routes have significantly
different delays, it would be the quickest way to connect. Such a scheme
would seem to be most beneficial for trying to connect to one of many
servers by connecting with the first server that responds, but I don't
think that's the goal of connectx.

Thanks

Frank Filz