Ejemplo n.º 1
0
Archivo: stub_ep.c Proyecto: hjelmn/ucx
UCS_CLASS_INIT_FUNC(ucp_stub_ep_t, ucp_ep_h ucp_ep) {

    memset(&self->iface, 0, sizeof(self->iface));
    self->iface.ops.ep_flush          = (void*)ucs_empty_function_return_success;
    self->iface.ops.ep_destroy        = UCS_CLASS_DELETE_FUNC_NAME(ucp_stub_ep_t);
    self->iface.ops.ep_pending_add    = ucp_stub_pending_add;
    self->iface.ops.ep_pending_purge  = ucp_stub_pending_purge;
    self->iface.ops.ep_put_short      = (void*)ucp_stub_ep_send_func;
    self->iface.ops.ep_put_bcopy      = (void*)ucp_stub_ep_bcopy_send_func;
    self->iface.ops.ep_put_zcopy      = (void*)ucp_stub_ep_send_func;
    self->iface.ops.ep_get_bcopy      = (void*)ucp_stub_ep_send_func;
    self->iface.ops.ep_get_zcopy      = (void*)ucp_stub_ep_send_func;
    self->iface.ops.ep_am_short       = (void*)ucp_stub_ep_send_func;
    self->iface.ops.ep_am_bcopy       = (void*)ucp_stub_ep_bcopy_send_func;
    self->iface.ops.ep_am_zcopy       = (void*)ucp_stub_ep_send_func;
    self->iface.ops.ep_atomic_add64   = (void*)ucp_stub_ep_send_func;
    self->iface.ops.ep_atomic_fadd64  = (void*)ucp_stub_ep_send_func;
    self->iface.ops.ep_atomic_swap64  = (void*)ucp_stub_ep_send_func;
    self->iface.ops.ep_atomic_cswap64 = (void*)ucp_stub_ep_send_func;
    self->iface.ops.ep_atomic_add32   = (void*)ucp_stub_ep_send_func;
    self->iface.ops.ep_atomic_fadd32  = (void*)ucp_stub_ep_send_func;
    self->iface.ops.ep_atomic_swap32  = (void*)ucp_stub_ep_send_func;
    self->iface.ops.ep_atomic_cswap32 = (void*)ucp_stub_ep_send_func;

    self->super.iface                 = &self->iface;
    self->ep                          = ucp_ep;
    self->aux_ep                      = NULL;
    self->next_ep                     = NULL;
    self->pending_count               = 0;

    ucs_queue_head_init(&self->pending_q);

    return UCS_OK;
}
Ejemplo n.º 2
0
UCS_CLASS_INIT_FUNC(ucp_dummy_ep_t, ucp_ep_h ucp_ep) {

    memset(&self->iface, 0, sizeof(self->iface));
    self->iface.ops.ep_flush          = (void*)ucs_empty_function_return_success;
    self->iface.ops.ep_destroy        = UCS_CLASS_DELETE_FUNC_NAME(ucp_dummy_ep_t);
    self->iface.ops.ep_req_notify     = (void*)ucs_empty_function_return_success;
    self->iface.ops.ep_put_short      = (void*)ucp_dummy_ep_send_func;
    self->iface.ops.ep_put_bcopy      = (void*)ucp_dummy_ep_send_func;
    self->iface.ops.ep_put_zcopy      = (void*)ucp_dummy_ep_send_func;
    self->iface.ops.ep_get_bcopy      = (void*)ucp_dummy_ep_send_func;
    self->iface.ops.ep_get_zcopy      = (void*)ucp_dummy_ep_send_func;
    self->iface.ops.ep_am_short       = (void*)ucp_dummy_ep_send_func;
    self->iface.ops.ep_am_bcopy       = (void*)ucp_dummy_ep_send_func;
    self->iface.ops.ep_am_zcopy       = (void*)ucp_dummy_ep_send_func;
    self->iface.ops.ep_atomic_add64   = (void*)ucp_dummy_ep_send_func;
    self->iface.ops.ep_atomic_fadd64  = (void*)ucp_dummy_ep_send_func;
    self->iface.ops.ep_atomic_swap64  = (void*)ucp_dummy_ep_send_func;
    self->iface.ops.ep_atomic_cswap64 = (void*)ucp_dummy_ep_send_func;
    self->iface.ops.ep_atomic_add32   = (void*)ucp_dummy_ep_send_func;
    self->iface.ops.ep_atomic_fadd32  = (void*)ucp_dummy_ep_send_func;
    self->iface.ops.ep_atomic_swap32  = (void*)ucp_dummy_ep_send_func;
    self->iface.ops.ep_atomic_cswap32 = (void*)ucp_dummy_ep_send_func;

    self->super.iface = &self->iface;
    self->ep          = ucp_ep;
    self->refcount    = 1;
    return UCS_OK;
}
Ejemplo n.º 3
0
    if(uct_ugni_can_flush(&ep->super)) {
        UCT_TL_EP_STAT_FLUSH(ucs_derived_of(tl_ep, uct_base_ep_t));
        status = UCS_OK;
    } else {
        ep->super.flush_flag = 1;
        UCT_TL_EP_STAT_FLUSH_WAIT(ucs_derived_of(tl_ep, uct_base_ep_t));
        status = UCS_ERR_NO_RESOURCE;
    }

    return status;
}

uct_iface_ops_t uct_ugni_smsg_iface_ops = {
    .iface_query           = uct_ugni_smsg_iface_query,
    .iface_flush           = uct_ugni_smsg_iface_flush,
    .iface_close           = UCS_CLASS_DELETE_FUNC_NAME(uct_ugni_smsg_iface_t),
    .iface_get_address     = uct_ugni_iface_get_address,
    .iface_get_device_address = uct_ugni_iface_get_dev_address,
    .iface_is_reachable    = uct_ugni_iface_is_reachable,
    .iface_release_am_desc = uct_ugni_smsg_iface_release_am_desc,
    .ep_create             = UCS_CLASS_NEW_FUNC_NAME(uct_ugni_smsg_ep_t),
    .ep_get_address        = uct_ugni_smsg_ep_get_address,
    .ep_connect_to_ep      = uct_ugni_smsg_ep_connect_to_ep,
    .ep_destroy            = UCS_CLASS_DELETE_FUNC_NAME(uct_ugni_smsg_ep_t),
    .ep_pending_add        = uct_ugni_ep_pending_add,
    .ep_pending_purge      = uct_ugni_ep_pending_purge,
    .ep_am_short           = uct_ugni_smsg_ep_am_short,
    .ep_am_bcopy           = uct_ugni_smsg_ep_am_bcopy,
    .ep_flush              = uct_ugni_smsg_ep_flush,
};
Ejemplo n.º 4
0
    iface_attr->iface_addr_len         = sizeof(uct_sockaddr_process_t);
    iface_attr->ep_addr_len            = 0;
    iface_attr->cap.flags              = UCT_IFACE_FLAG_GET_ZCOPY |
                                         UCT_IFACE_FLAG_PUT_ZCOPY |
                                         UCT_IFACE_FLAG_CONNECT_TO_IFACE;

    iface_attr->latency                = 80e-9; /* 80 ns */
    iface_attr->bandwidth              = 6911 * 1024.0 * 1024.0;
    iface_attr->overhead               = 50e-6; /* 50 us */
    return UCS_OK;
}

static UCS_CLASS_DECLARE_DELETE_FUNC(uct_cma_iface_t, uct_iface_t);

static uct_iface_ops_t uct_cma_iface_ops = {
    .iface_close         = UCS_CLASS_DELETE_FUNC_NAME(uct_cma_iface_t),
    .iface_query         = uct_cma_iface_query,
    .iface_get_address   = uct_cma_iface_get_address,
    .iface_is_reachable  = uct_cma_iface_is_reachable,
    .iface_flush         = (void*)ucs_empty_function_return_success,
    .ep_put_zcopy        = uct_cma_ep_put_zcopy,
    .ep_get_zcopy        = uct_cma_ep_get_zcopy,
    .ep_flush            = (void*)ucs_empty_function_return_success,
    .ep_create_connected = UCS_CLASS_NEW_FUNC_NAME(uct_cma_ep_t),
    .ep_destroy          = UCS_CLASS_DELETE_FUNC_NAME(uct_cma_ep_t),
};

static UCS_CLASS_INIT_FUNC(uct_cma_iface_t, uct_pd_h pd, uct_worker_h worker,
                           const char *dev_name, size_t rx_headroom,
                           const uct_iface_config_t *tl_config)
{
Ejemplo n.º 5
0
        return status;
    }

    status = uct_ud_mlx5_ep_create_ah(iface, ep, if_addr);
    if (status != UCS_OK) {
        return status;
    }

    return UCS_OK;
}


static void UCS_CLASS_DELETE_FUNC_NAME(uct_ud_mlx5_iface_t)(uct_iface_t*);

uct_iface_ops_t uct_ud_mlx5_iface_ops = {
    .iface_close           = UCS_CLASS_DELETE_FUNC_NAME(uct_ud_mlx5_iface_t),
    .iface_flush           = uct_ud_iface_flush,
    .iface_release_am_desc = uct_ib_iface_release_am_desc,
    .iface_get_address     = uct_ud_iface_get_address,
    .iface_is_reachable    = uct_ib_iface_is_reachable,
    .iface_query           = uct_ud_mlx5_iface_query,

    .ep_create             = UCS_CLASS_NEW_FUNC_NAME(uct_ud_mlx5_ep_t),
    .ep_destroy            = UCS_CLASS_DELETE_FUNC_NAME(uct_ud_mlx5_ep_t),
    .ep_get_address        = uct_ud_ep_get_address,

    .ep_create_connected   = uct_ud_mlx5_ep_create_connected,
    .ep_connect_to_ep      = uct_ud_mlx5_ep_connect_to_ep, 

    .ep_put_short          = uct_ud_mlx5_ep_put_short,
    .ep_am_short           = uct_ud_mlx5_ep_am_short,
Ejemplo n.º 6
0
static void UCS_CLASS_DELETE_FUNC_NAME(uct_dc_mlx5_iface_t)(uct_iface_t*);

static uct_rc_iface_ops_t uct_dc_mlx5_iface_ops = {
    {
        {
            .iface_close              = UCS_CLASS_DELETE_FUNC_NAME(uct_dc_mlx5_iface_t),
            .iface_query              = uct_dc_mlx5_iface_query,
            .iface_get_device_address = uct_ib_iface_get_device_address,
            .iface_is_reachable       = uct_ib_iface_is_reachable,
            .iface_release_am_desc    = uct_ib_iface_release_am_desc,
            .iface_get_address        = uct_dc_iface_get_address,

            .iface_flush              = uct_dc_iface_flush,

            .ep_create_connected      = UCS_CLASS_NEW_FUNC_NAME(uct_dc_mlx5_ep_t),
            .ep_destroy               = UCS_CLASS_DELETE_FUNC_NAME(uct_dc_mlx5_ep_t),

            .ep_am_short              = uct_dc_mlx5_ep_am_short,
            .ep_am_bcopy              = uct_dc_mlx5_ep_am_bcopy,
            .ep_am_zcopy              = uct_dc_mlx5_ep_am_zcopy,

            .ep_put_short             = uct_dc_mlx5_ep_put_short,
            .ep_put_bcopy             = uct_dc_mlx5_ep_put_bcopy,
            .ep_put_zcopy             = uct_dc_mlx5_ep_put_zcopy,

            .ep_get_bcopy             = uct_dc_mlx5_ep_get_bcopy,
            .ep_get_zcopy             = uct_dc_mlx5_ep_get_zcopy,

            .ep_atomic_add64          = uct_dc_mlx5_ep_atomic_add64,
            .ep_atomic_fadd64         = uct_dc_mlx5_ep_atomic_fadd64,
            .ep_atomic_swap64         = uct_dc_mlx5_ep_atomic_swap64,
Ejemplo n.º 7
0
    iface_attr->bandwidth               = 6911 * 1024.0 * 1024.0;
    iface_attr->overhead                = 0;
    iface_attr->priority                = 0;

    return UCS_OK;
}

static uct_iface_ops_t uct_gdr_copy_iface_ops = {
    .ep_put_short             = uct_gdr_copy_ep_put_short,
    .ep_get_short             = uct_gdr_copy_ep_get_short,
    .ep_pending_add           = ucs_empty_function_return_busy,
    .ep_pending_purge         = ucs_empty_function,
    .ep_flush                 = uct_base_ep_flush,
    .ep_fence                 = uct_base_ep_fence,
    .ep_create                = UCS_CLASS_NEW_FUNC_NAME(uct_gdr_copy_ep_t),
    .ep_destroy               = UCS_CLASS_DELETE_FUNC_NAME(uct_gdr_copy_ep_t),
    .iface_flush              = uct_base_iface_flush,
    .iface_fence              = uct_base_iface_fence,
    .iface_progress_enable    = ucs_empty_function,
    .iface_progress_disable   = ucs_empty_function,
    .iface_progress           = ucs_empty_function_return_zero,
    .iface_close              = UCS_CLASS_DELETE_FUNC_NAME(uct_gdr_copy_iface_t),
    .iface_query              = uct_gdr_copy_iface_query,
    .iface_get_device_address = (void*)ucs_empty_function_return_success,
    .iface_get_address        = uct_gdr_copy_iface_get_address,
    .iface_is_reachable       = uct_gdr_copy_iface_is_reachable,
};

static UCS_CLASS_INIT_FUNC(uct_gdr_copy_iface_t, uct_md_h md, uct_worker_h worker,
                           const uct_iface_params_t *params,
                           const uct_iface_config_t *tl_config)
Ejemplo n.º 8
0
    ucs_notifier_chain_remove(&self->super.super.super.worker->progress_chain,
                              uct_rc_verbs_iface_progress, self);
    ucs_mpool_destroy(self->short_desc_mp);
}

UCS_CLASS_DEFINE(uct_rc_verbs_iface_t, uct_rc_iface_t);
static UCS_CLASS_DEFINE_NEW_FUNC(uct_rc_verbs_iface_t, uct_iface_t, uct_pd_h,
                                 uct_worker_h, const char*, size_t,
                                 const uct_iface_config_t*);
static UCS_CLASS_DEFINE_DELETE_FUNC(uct_rc_verbs_iface_t, uct_iface_t);


uct_iface_ops_t uct_rc_verbs_iface_ops = {
    .iface_query         = uct_rc_verbs_iface_query,
    .iface_flush         = uct_rc_iface_flush,
    .iface_close         = UCS_CLASS_DELETE_FUNC_NAME(uct_rc_verbs_iface_t),
    .iface_release_am_desc= uct_ib_iface_release_am_desc,
    .ep_create           = UCS_CLASS_NEW_FUNC_NAME(uct_rc_verbs_ep_t),
    .ep_get_address      = uct_rc_ep_get_address,
    .ep_connect_to_ep    = uct_rc_ep_connect_to_ep,
    .iface_get_address   = uct_ib_iface_get_subnet_address,
    .iface_is_reachable  = uct_ib_iface_is_reachable,
    .ep_destroy          = UCS_CLASS_DELETE_FUNC_NAME(uct_rc_verbs_ep_t),
    .ep_am_short         = uct_rc_verbs_ep_am_short,
    .ep_am_bcopy         = uct_rc_verbs_ep_am_bcopy,
    .ep_am_zcopy         = uct_rc_verbs_ep_am_zcopy,
    .ep_put_short        = uct_rc_verbs_ep_put_short,
    .ep_put_bcopy        = uct_rc_verbs_ep_put_bcopy,
    .ep_put_zcopy        = uct_rc_verbs_ep_put_zcopy,
    .ep_get_bcopy        = uct_rc_verbs_ep_get_bcopy,
    .ep_get_zcopy        = uct_rc_verbs_ep_get_zcopy,
Ejemplo n.º 9
0
Archivo: ud_mlx5.c Proyecto: hjelmn/ucx
        return status;
    }

    status = uct_ud_mlx5_ep_create_ah(iface, ep, if_addr);
    if (status != UCS_OK) {
        return status;
    }

    return UCS_OK;
}


static void UCS_CLASS_DELETE_FUNC_NAME(uct_ud_mlx5_iface_t)(uct_iface_t*);

uct_iface_ops_t uct_ud_mlx5_iface_ops = {
    .iface_close           = UCS_CLASS_DELETE_FUNC_NAME(uct_ud_mlx5_iface_t),
    .iface_flush           = uct_ud_iface_flush,
    .iface_release_am_desc = uct_ib_iface_release_am_desc,
    .iface_get_address     = uct_ud_iface_get_address,
    .iface_is_reachable    = uct_ib_iface_is_reachable,
    .iface_query           = uct_ud_mlx5_iface_query,

    .ep_create             = UCS_CLASS_NEW_FUNC_NAME(uct_ud_mlx5_ep_t),
    .ep_destroy            = uct_ud_ep_disconnect, 
    .ep_get_address        = uct_ud_ep_get_address,

    .ep_create_connected   = uct_ud_mlx5_ep_create_connected,
    .ep_connect_to_ep      = uct_ud_mlx5_ep_connect_to_ep, 

    .ep_put_short          = uct_ud_mlx5_ep_put_short,
    .ep_am_short           = uct_ud_mlx5_ep_am_short,