[openib-general] RDMA_CM_EVENT_UNREACHABLE(-ETIMEDOUT)
Or Gerlitz
ogerlitz at voltaire.com
Mon Aug 7 02:55:55 PDT 2006
Sean Hefty wrote:
> Or Gerlitz wrote:
>> Is it correct that with the gen2 code, the remote **CM** will
>> reconnect on that case?
> I don't think so. The QP needs to move into timewait, so a new
> connection request is needed with a different QPN.
Just to make sure, you replaced "CM id" with QP and QPN in the sentence
above, correct? its fine to recycle QPs, eg when re-connect that follows
sending a REQ and getting a REJ whose reason is stale connection is
carried out?!
>> I see in cm.c :: cm_rej_handler() that when the state is
>> IB_CM_REQ_SENT and the reject reason is IB_CM_REJ_STALE_CONN you just
>> move the cm_id into timewait state, which will cause a retry on the
>> REQ, correct?
> The cm_id moves into timewait, but that shouldn't cause a retry. The CM
> should notify the ULP of the reject. The QP cannot be re-used until the
> cm_id exits the timewait state.
OK, i understand it now better, however:
Your reply made me rethink the issue of reject reasons handling in the
CMA framework and i have figured out we might have a little hole here...
This is as of include/rdma/ib_cm.h :: ib_cm_rej_reason enum values being
delivered up by the CMA to the ULP in the status field of the cma
event but the ULP is not aware to this enum...
One solution i can think of is sorting out the values of
ib_cm_rej_reason to few categories:
0) ones that are of no interest to the CMA nor to the ULP above it but
rather only to the local CM (are there any?)
1) ones that *must* be handled internally by the CMA (are there any?)
2) ones that *can* be handled internally by the CMA (eg stale-conn)
3) ones that can be translated to errno value (eg invalid-sid (8) to
econnrefused) and set the cma event status field to the errno value
4) ones that do not fall into none of 0-3 above, for those set the
status field to ENOPROTO and once a CMA app that gets ENOPROTO and has
an issue with it would show up, we will see what can we do.
Please let me know what you think
Or.
More information about the general
mailing list