[openib-general] DAPL CM Reject Questions

Hal Rosenstock halr at voltaire.com
Thu May 12 05:41:45 PDT 2005


Hi Sean,

I have a couple questions related to REJ and the CM based on the IBA
spec and the CM.

On the passive side, an RTU is received but the QP cannot be transition
to RTS so a REJ is attempted as below:

static int do_rtu_recv(struct dapl_cm_id *conn)
{
        int status;

        status = dapl_modify_qp_state_to_rts(conn->cm_id, conn->ep->qp_handle);
        if (status) {
                dapl_dbg_log(DAPL_DBG_TYPE_ERR, " do_rtu_recv: could not "
                             "modify QP state to RTS status %d\n", status);
                goto reject;
        }
	...

reject:
        ib_send_cm_rej(conn->cm_id, IB_CM_REJ_CONSUMER_DEFINED, NULL, 0,
                       NULL, 0);

If RTU is received, the connection would be in ESTABLISHED state. Is
sending REJ valid there ? What's odd to me is that the CM state machine
in the IBA spec shows REJ being received in the established state on the
active side (and moving to TIMEWAIT) but there is no action out of
established on the passive side showing send REJ.

If sending REJ is valid on the passive side in established state, does
the current CM handle this ? It looks to me like it returns -EINVAL for
this case.

        switch (cm_id->state) {
        case IB_CM_REQ_SENT:
        case IB_CM_MRA_REQ_RCVD:
        case IB_CM_REQ_RCVD:
        case IB_CM_MRA_REQ_SENT:
        case IB_CM_REP_RCVD:
        case IB_CM_MRA_REP_SENT:
                cm_reset_to_idle(cm_id_priv);
                break;
        case IB_CM_REP_SENT:
        case IB_CM_MRA_REP_RCVD:
                cm_enter_timewait(cm_id_priv);
                break;
        default:
                spin_unlock_irqrestore(&cm_id_priv->lock, flags);
                ret = -EINVAL;
                goto out;
        }

-- Hal




More information about the general mailing list