Lines Matching refs:cm_id
85 struct rdma_cm_id *cm_id; member
106 struct rdma_cm_id *cm_id; member
243 static int ucma_event_handler(struct rdma_cm_id *cm_id, in ucma_event_handler() argument
247 struct ucma_context *ctx = cm_id->context; in ucma_event_handler()
255 uevent->cm_id = cm_id; in ucma_event_handler()
259 if (cm_id->qp_type == IB_QPT_UD) in ucma_event_handler()
327 ctx->cm_id = uevent->cm_id; in ucma_get_event()
328 ctx->cm_id->context = ctx; in ucma_get_event()
392 ctx->cm_id = rdma_create_id(ucma_event_handler, ctx, cmd.ps, qp_type); in ucma_create_id()
393 if (IS_ERR(ctx->cm_id)) { in ucma_create_id()
394 ret = PTR_ERR(ctx->cm_id); in ucma_create_id()
407 rdma_destroy_id(ctx->cm_id); in ucma_create_id()
454 rdma_destroy_id(ctx->cm_id); in ucma_free_ctx()
470 rdma_destroy_id(uevent->cm_id); in ucma_free_ctx()
527 ret = rdma_bind_addr(ctx->cm_id, (struct sockaddr *) &cmd.addr); in ucma_bind_addr()
547 ret = rdma_resolve_addr(ctx->cm_id, (struct sockaddr *) &cmd.src_addr, in ucma_resolve_addr()
569 ret = rdma_resolve_route(ctx->cm_id, cmd.timeout_ms); in ucma_resolve_route()
669 addr = (struct sockaddr *) &ctx->cm_id->route.addr.src_addr; in ucma_query_route()
673 addr = (struct sockaddr *) &ctx->cm_id->route.addr.dst_addr; in ucma_query_route()
677 if (!ctx->cm_id->device) in ucma_query_route()
680 resp.node_guid = (__force __u64) ctx->cm_id->device->node_guid; in ucma_query_route()
681 resp.port_num = ctx->cm_id->port_num; in ucma_query_route()
682 switch (rdma_node_get_transport(ctx->cm_id->device->node_type)) { in ucma_query_route()
684 switch (rdma_port_get_link_layer(ctx->cm_id->device, in ucma_query_route()
685 ctx->cm_id->port_num)) { in ucma_query_route()
687 ucma_copy_ib_route(&resp, &ctx->cm_id->route); in ucma_query_route()
690 ucma_copy_iboe_route(&resp, &ctx->cm_id->route); in ucma_query_route()
697 ucma_copy_iw_route(&resp, &ctx->cm_id->route); in ucma_query_route()
745 ret = rdma_connect(ctx->cm_id, &conn_param); in ucma_connect()
766 ret = rdma_listen(ctx->cm_id, ctx->backlog); in ucma_listen()
789 ret = rdma_accept(ctx->cm_id, &conn_param); in ucma_accept()
794 ret = rdma_accept(ctx->cm_id, NULL); in ucma_accept()
814 ret = rdma_reject(ctx->cm_id, cmd.private_data, cmd.private_data_len); in ucma_reject()
833 ret = rdma_disconnect(ctx->cm_id); in ucma_disconnect()
861 ret = rdma_init_qp_attr(ctx->cm_id, &qp_attr, &resp.qp_attr_mask); in ucma_init_qp_attr()
886 rdma_set_service_type(ctx->cm_id, *((u8 *) optval)); in ucma_set_option_id()
893 ret = rdma_set_reuseaddr(ctx->cm_id, *((int *) optval) ? 1 : 0); in ucma_set_option_id()
900 ret = rdma_set_afonly(ctx->cm_id, *((int *) optval) ? 1 : 0); in ucma_set_option_id()
929 ret = rdma_set_ib_paths(ctx->cm_id, &sa_path, 1); in ucma_set_ib_path()
935 return ucma_event_handler(ctx->cm_id, &event); in ucma_set_ib_path()
1018 ret = rdma_notify(ctx->cm_id, (enum ib_event_type) cmd.event); in ucma_notify()
1052 ret = rdma_join_multicast(ctx->cm_id, (struct sockaddr *) &mc->addr, mc); in ucma_join_multicast()
1068 rdma_leave_multicast(ctx->cm_id, (struct sockaddr *) &mc->addr); in ucma_join_multicast()
1114 rdma_leave_multicast(mc->ctx->cm_id, (struct sockaddr *) &mc->addr); in ucma_leave_multicast()