[openib-general] CMA: compliancy issue?
Michael S. Tsirkin
mst at mellanox.co.il
Mon May 8 06:11:56 PDT 2006
Quoting r. Or Gerlitz <ogerlitz at voltaire.com>:
> The design of the CMA say that if the ULP wants the CMA to do the QP
> states transitions it should call rdma_create_qp and later the CMA will
> not deliver up event of REP but instead modify the QP state to RTR, RTS
> and send an RTU. And vise versa, if the ULP want to get a callback on
> REP it should ***not*** call rdma_create_qp and rather do the state
> changes by itself.
I think you are mistaken. Here's code from cma.c
case IB_CM_REP_RECEIVED:
if (id_priv->id.qp) {
status = cma_rep_recv(id_priv);
event = status ? RDMA_CM_EVENT_CONNECT_ERROR :
RDMA_CM_EVENT_ESTABLISHED;
} else
event = RDMA_CM_EVENT_CONNECT_RESPONSE;
So CMA passes the REP to the ULP as inside RDMA_CM_EVENT_ESTABLISHED event.
This works fine for me: on seeing RDMA_CM_EVENT_ESTABLISHED, SDP actually looks
at private data and gets all the parameters it needs from the REP.
What I am saying is that CMA should call the ULP on the REP *before* sending
RTU, and API should give ULP an option to reject the connection based on private
data.
And no, I don't want to handle state transitions myself, I think
think capability is mainly useful for userspace.
--
MST
More information about the general
mailing list