[openib-general] Setting kdapl ep_state relative to calling disconnect

Hal Rosenstock halr at voltaire.com
Thu Jun 23 07:57:01 PDT 2005


Hi,

In dapl_evd.c, there are cases where the ep_state is updated before
calling disconnect and others where this is done after. Should these be
made consistent ?

void dapl_evd_connection_callback(...)
{
...
        case DAT_CONNECTION_EVENT_DISCONNECTED:
                ep->param.ep_state = DAT_EP_STATE_DISCONNECTED;
                spin_unlock_irqrestore(&ep->common.lock, ep->common.flags);
                dapl_ib_disconnect_clean(ep);
                break;
        case DAT_CONNECTION_EVENT_PEER_REJECTED:
        case DAT_CONNECTION_EVENT_UNREACHABLE:
        case DAT_CONNECTION_EVENT_NON_PEER_REJECTED:
        case DAT_CONNECTION_EVENT_BROKEN:
                ep->param.ep_state = DAT_EP_STATE_DISCONNECTED;
                spin_unlock_irqrestore(&ep->common.lock, ep->common.flags);
                dapl_ib_disconnect_clean(ep);
                break;

void dapl_evd_connection_callback(...)
{
                        dapl_ib_disconnect(ep, DAT_CLOSE_ABRUPT_FLAG);
                        spin_lock_irqsave(&ep->common.lock, ep->common.flags);
                        ep->param.ep_state = DAT_EP_STATE_DISCONNECTED;
                        spin_unlock_irqrestore(&ep->common.lock,
                                               ep->common.flags);

-- Hal




More information about the general mailing list