Example #1
0
static void uct_cm_iface_outstanding_remove(uct_cm_iface_t* iface,
                                            struct ib_cm_id* id)
{
    unsigned index;

    for (index = 0; index < iface->num_outstanding; ++index) {
        if (iface->outstanding[index] == id) {
            iface->outstanding[index] = uct_cm_iface_outstanding_pop(iface);
            return;
        }
    }

    ucs_fatal("outstanding cm id %p not found", id);
}
Example #2
0
static UCS_CLASS_CLEANUP_FUNC(uct_cm_iface_t)
{

    ucs_trace_func("");

    ucs_async_unset_event_handler(self->cmdev->fd);

    uct_cm_enter(self);
    while (self->num_outstanding > 0) {
        ib_cm_destroy_id(uct_cm_iface_outstanding_pop(self));
    }
    ib_cm_destroy_id(self->listen_id);
    ib_cm_close_device(self->cmdev);
    uct_cm_leave(self);

    ucs_free(self->outstanding);
}
Example #3
0
static UCS_CLASS_CLEANUP_FUNC(uct_cm_iface_t)
{

    ucs_trace_func("");

    ucs_async_unset_event_handler(self->cmdev->fd);

    uct_cm_enter(self);
    while (self->num_outstanding > 0) {
        ib_cm_destroy_id(uct_cm_iface_outstanding_pop(self));
    }
    ib_cm_destroy_id(self->listen_id);
    ib_cm_close_device(self->cmdev);
    uct_cm_leave(self);

    /* At this point all outstanding have been removed, and no further events
     * can be added.
     */
    ucs_callbackq_remove_all(&uct_cm_iface_worker(self)->progress_q,
                             uct_cm_iface_progress, self);

    ucs_free(self->outstanding);
}