• Home
  • Raw
  • Download

Lines Matching refs:cm_id

87 	struct rdma_cm_id	*cm_id;  member
108 struct rdma_cm_id *cm_id; member
245 static int ucma_event_handler(struct rdma_cm_id *cm_id, in ucma_event_handler() argument
249 struct ucma_context *ctx = cm_id->context; in ucma_event_handler()
257 uevent->cm_id = cm_id; in ucma_event_handler()
261 if (cm_id->qp_type == IB_QPT_UD) in ucma_event_handler()
274 } else if (!ctx->uid || ctx->cm_id != cm_id) { in ucma_event_handler()
329 ctx->cm_id = uevent->cm_id; in ucma_get_event()
330 ctx->cm_id->context = ctx; in ucma_get_event()
394 ctx->cm_id = rdma_create_id(ucma_event_handler, ctx, cmd.ps, qp_type); in ucma_create_id()
395 if (IS_ERR(ctx->cm_id)) { in ucma_create_id()
396 ret = PTR_ERR(ctx->cm_id); in ucma_create_id()
409 rdma_destroy_id(ctx->cm_id); in ucma_create_id()
456 rdma_destroy_id(ctx->cm_id); in ucma_free_ctx()
472 rdma_destroy_id(uevent->cm_id); in ucma_free_ctx()
529 ret = rdma_bind_addr(ctx->cm_id, (struct sockaddr *) &cmd.addr); in ucma_bind_ip()
553 ret = rdma_bind_addr(ctx->cm_id, addr); in ucma_bind()
573 ret = rdma_resolve_addr(ctx->cm_id, (struct sockaddr *) &cmd.src_addr, in ucma_resolve_ip()
602 ret = rdma_resolve_addr(ctx->cm_id, src, dst, cmd.timeout_ms); in ucma_resolve_addr()
622 ret = rdma_resolve_route(ctx->cm_id, cmd.timeout_ms); in ucma_resolve_route()
712 addr = (struct sockaddr *) &ctx->cm_id->route.addr.src_addr; in ucma_query_route()
716 addr = (struct sockaddr *) &ctx->cm_id->route.addr.dst_addr; in ucma_query_route()
720 if (!ctx->cm_id->device) in ucma_query_route()
723 resp.node_guid = (__force __u64) ctx->cm_id->device->node_guid; in ucma_query_route()
724 resp.port_num = ctx->cm_id->port_num; in ucma_query_route()
725 switch (rdma_node_get_transport(ctx->cm_id->device->node_type)) { in ucma_query_route()
727 switch (rdma_port_get_link_layer(ctx->cm_id->device, in ucma_query_route()
728 ctx->cm_id->port_num)) { in ucma_query_route()
730 ucma_copy_ib_route(&resp, &ctx->cm_id->route); in ucma_query_route()
733 ucma_copy_iboe_route(&resp, &ctx->cm_id->route); in ucma_query_route()
740 ucma_copy_iw_route(&resp, &ctx->cm_id->route); in ucma_query_route()
755 static void ucma_query_device_addr(struct rdma_cm_id *cm_id, in ucma_query_device_addr() argument
758 if (!cm_id->device) in ucma_query_device_addr()
761 resp->node_guid = (__force __u64) cm_id->device->node_guid; in ucma_query_device_addr()
762 resp->port_num = cm_id->port_num; in ucma_query_device_addr()
764 ib_addr_get_pkey(&cm_id->route.addr.dev_addr)); in ucma_query_device_addr()
779 addr = (struct sockaddr *) &ctx->cm_id->route.addr.src_addr; in ucma_query_addr()
783 addr = (struct sockaddr *) &ctx->cm_id->route.addr.dst_addr; in ucma_query_addr()
787 ucma_query_device_addr(ctx->cm_id, &resp); in ucma_query_addr()
808 resp->num_paths = ctx->cm_id->route.num_paths; in ucma_query_path()
815 ib_sa_pack_path(&ctx->cm_id->route.path_rec[i], in ucma_query_path()
839 ucma_query_device_addr(ctx->cm_id, &resp); in ucma_query_gid()
843 if (ctx->cm_id->route.addr.src_addr.ss_family == AF_IB) { in ucma_query_gid()
844 memcpy(addr, &ctx->cm_id->route.addr.src_addr, resp.src_size); in ucma_query_gid()
848 rdma_addr_get_sgid(&ctx->cm_id->route.addr.dev_addr, in ucma_query_gid()
850 addr->sib_sid = rdma_get_service_id(ctx->cm_id, (struct sockaddr *) in ucma_query_gid()
851 &ctx->cm_id->route.addr.src_addr); in ucma_query_gid()
856 if (ctx->cm_id->route.addr.dst_addr.ss_family == AF_IB) { in ucma_query_gid()
857 memcpy(addr, &ctx->cm_id->route.addr.dst_addr, resp.dst_size); in ucma_query_gid()
861 rdma_addr_get_dgid(&ctx->cm_id->route.addr.dev_addr, in ucma_query_gid()
863 addr->sib_sid = rdma_get_service_id(ctx->cm_id, (struct sockaddr *) in ucma_query_gid()
864 &ctx->cm_id->route.addr.dst_addr); in ucma_query_gid()
943 ucma_copy_conn_param(ctx->cm_id, &conn_param, &cmd.conn_param); in ucma_connect()
944 ret = rdma_connect(ctx->cm_id, &conn_param); in ucma_connect()
965 ret = rdma_listen(ctx->cm_id, ctx->backlog); in ucma_listen()
986 ucma_copy_conn_param(ctx->cm_id, &conn_param, &cmd.conn_param); in ucma_accept()
988 ret = rdma_accept(ctx->cm_id, &conn_param); in ucma_accept()
993 ret = rdma_accept(ctx->cm_id, NULL); in ucma_accept()
1013 ret = rdma_reject(ctx->cm_id, cmd.private_data, cmd.private_data_len); in ucma_reject()
1032 ret = rdma_disconnect(ctx->cm_id); in ucma_disconnect()
1060 ret = rdma_init_qp_attr(ctx->cm_id, &qp_attr, &resp.qp_attr_mask); in ucma_init_qp_attr()
1085 rdma_set_service_type(ctx->cm_id, *((u8 *) optval)); in ucma_set_option_id()
1092 ret = rdma_set_reuseaddr(ctx->cm_id, *((int *) optval) ? 1 : 0); in ucma_set_option_id()
1099 ret = rdma_set_afonly(ctx->cm_id, *((int *) optval) ? 1 : 0); in ucma_set_option_id()
1131 ret = rdma_set_ib_paths(ctx->cm_id, &sa_path, 1); in ucma_set_ib_path()
1137 return ucma_event_handler(ctx->cm_id, &event); in ucma_set_ib_path()
1220 ret = rdma_notify(ctx->cm_id, (enum ib_event_type) cmd.event); in ucma_notify()
1254 ret = rdma_join_multicast(ctx->cm_id, (struct sockaddr *) &mc->addr, mc); in ucma_process_join()
1270 rdma_leave_multicast(ctx->cm_id, (struct sockaddr *) &mc->addr); in ucma_process_join()
1348 rdma_leave_multicast(mc->ctx->cm_id, (struct sockaddr *) &mc->addr); in ucma_leave_multicast()