Lines Matching refs:resp
121 struct rdma_ucm_event_resp resp; member
295 uevent->resp.uid = uevent->mc->uid; in ucma_set_event_context()
296 uevent->resp.id = uevent->mc->id; in ucma_set_event_context()
299 uevent->resp.uid = ctx->uid; in ucma_set_event_context()
300 uevent->resp.id = ctx->id; in ucma_set_event_context()
331 con_req_eve->resp.event == RDMA_CM_EVENT_CONNECT_REQUEST) { in ucma_removal_event_handler()
357 uevent->resp.event = event->event; in ucma_event_handler()
358 uevent->resp.status = event->status; in ucma_event_handler()
360 ucma_copy_ud_event(cm_id->device, &uevent->resp.param.ud, in ucma_event_handler()
363 ucma_copy_conn_event(&uevent->resp.param.conn, in ucma_event_handler()
410 if (out_len < sizeof(uevent->resp) - sizeof(uevent->resp.reserved)) in ucma_get_event()
432 if (uevent->resp.event == RDMA_CM_EVENT_CONNECT_REQUEST) { in ucma_get_event()
441 uevent->resp.id = ctx->id; in ucma_get_event()
445 &uevent->resp, in ucma_get_event()
446 min_t(size_t, out_len, sizeof(uevent->resp)))) { in ucma_get_event()
483 struct rdma_ucm_create_id_resp resp; in ucma_create_id() local
489 if (out_len < sizeof(resp)) in ucma_create_id()
513 resp.id = ctx->id; in ucma_create_id()
515 &resp, sizeof(resp))) { in ucma_create_id()
593 if (uevent->resp.event == RDMA_CM_EVENT_CONNECT_REQUEST) in ucma_free_ctx()
607 struct rdma_ucm_destroy_id_resp resp; in ucma_destroy_id() local
611 if (out_len < sizeof(resp)) in ucma_destroy_id()
643 resp.events_reported = ucma_free_ctx(ctx); in ucma_destroy_id()
645 &resp, sizeof(resp))) in ucma_destroy_id()
767 static void ucma_copy_ib_route(struct rdma_ucm_query_route_resp *resp, in ucma_copy_ib_route() argument
772 resp->num_paths = route->num_paths; in ucma_copy_ib_route()
777 (union ib_gid *) &resp->ib_route[0].dgid); in ucma_copy_ib_route()
779 (union ib_gid *) &resp->ib_route[0].sgid); in ucma_copy_ib_route()
780 resp->ib_route[0].pkey = cpu_to_be16(ib_addr_get_pkey(dev_addr)); in ucma_copy_ib_route()
783 ib_copy_path_rec_to_user(&resp->ib_route[1], in ucma_copy_ib_route()
787 ib_copy_path_rec_to_user(&resp->ib_route[0], in ucma_copy_ib_route()
795 static void ucma_copy_iboe_route(struct rdma_ucm_query_route_resp *resp, in ucma_copy_iboe_route() argument
799 resp->num_paths = route->num_paths; in ucma_copy_iboe_route()
803 (union ib_gid *)&resp->ib_route[0].dgid); in ucma_copy_iboe_route()
805 (union ib_gid *)&resp->ib_route[0].sgid); in ucma_copy_iboe_route()
806 resp->ib_route[0].pkey = cpu_to_be16(0xffff); in ucma_copy_iboe_route()
809 ib_copy_path_rec_to_user(&resp->ib_route[1], in ucma_copy_iboe_route()
813 ib_copy_path_rec_to_user(&resp->ib_route[0], in ucma_copy_iboe_route()
821 static void ucma_copy_iw_route(struct rdma_ucm_query_route_resp *resp, in ucma_copy_iw_route() argument
827 rdma_addr_get_dgid(dev_addr, (union ib_gid *) &resp->ib_route[0].dgid); in ucma_copy_iw_route()
828 rdma_addr_get_sgid(dev_addr, (union ib_gid *) &resp->ib_route[0].sgid); in ucma_copy_iw_route()
836 struct rdma_ucm_query_route_resp resp; in ucma_query_route() local
841 if (out_len < sizeof(resp)) in ucma_query_route()
851 memset(&resp, 0, sizeof resp); in ucma_query_route()
853 memcpy(&resp.src_addr, addr, addr->sa_family == AF_INET ? in ucma_query_route()
857 memcpy(&resp.dst_addr, addr, addr->sa_family == AF_INET ? in ucma_query_route()
863 resp.node_guid = (__force __u64) ctx->cm_id->device->node_guid; in ucma_query_route()
864 resp.port_num = ctx->cm_id->port_num; in ucma_query_route()
867 ucma_copy_ib_route(&resp, &ctx->cm_id->route); in ucma_query_route()
869 ucma_copy_iboe_route(&resp, &ctx->cm_id->route); in ucma_query_route()
871 ucma_copy_iw_route(&resp, &ctx->cm_id->route); in ucma_query_route()
875 &resp, sizeof(resp))) in ucma_query_route()
883 struct rdma_ucm_query_addr_resp *resp) in ucma_query_device_addr() argument
888 resp->node_guid = (__force __u64) cm_id->device->node_guid; in ucma_query_device_addr()
889 resp->port_num = cm_id->port_num; in ucma_query_device_addr()
890 resp->pkey = (__force __u16) cpu_to_be16( in ucma_query_device_addr()
897 struct rdma_ucm_query_addr_resp resp; in ucma_query_addr() local
901 if (out_len < sizeof(resp)) in ucma_query_addr()
904 memset(&resp, 0, sizeof resp); in ucma_query_addr()
907 resp.src_size = rdma_addr_size(addr); in ucma_query_addr()
908 memcpy(&resp.src_addr, addr, resp.src_size); in ucma_query_addr()
911 resp.dst_size = rdma_addr_size(addr); in ucma_query_addr()
912 memcpy(&resp.dst_addr, addr, resp.dst_size); in ucma_query_addr()
914 ucma_query_device_addr(ctx->cm_id, &resp); in ucma_query_addr()
916 if (copy_to_user(response, &resp, sizeof(resp))) in ucma_query_addr()
925 struct rdma_ucm_query_path_resp *resp; in ucma_query_path() local
928 if (out_len < sizeof(*resp)) in ucma_query_path()
931 resp = kzalloc(out_len, GFP_KERNEL); in ucma_query_path()
932 if (!resp) in ucma_query_path()
935 resp->num_paths = ctx->cm_id->route.num_paths; in ucma_query_path()
936 for (i = 0, out_len -= sizeof(*resp); in ucma_query_path()
937 i < resp->num_paths && out_len > sizeof(struct ib_path_rec_data); in ucma_query_path()
941 resp->path_data[i].flags = IB_PATH_GMP | IB_PATH_PRIMARY | in ucma_query_path()
947 ib_sa_pack_path(&ib, &resp->path_data[i].path_rec); in ucma_query_path()
950 ib_sa_pack_path(rec, &resp->path_data[i].path_rec); in ucma_query_path()
954 if (copy_to_user(response, resp, in ucma_query_path()
955 sizeof(*resp) + (i * sizeof(struct ib_path_rec_data)))) in ucma_query_path()
958 kfree(resp); in ucma_query_path()
965 struct rdma_ucm_query_addr_resp resp; in ucma_query_gid() local
969 if (out_len < sizeof(resp)) in ucma_query_gid()
972 memset(&resp, 0, sizeof resp); in ucma_query_gid()
974 ucma_query_device_addr(ctx->cm_id, &resp); in ucma_query_gid()
976 addr = (struct sockaddr_ib *) &resp.src_addr; in ucma_query_gid()
977 resp.src_size = sizeof(*addr); in ucma_query_gid()
979 memcpy(addr, &ctx->cm_id->route.addr.src_addr, resp.src_size); in ucma_query_gid()
982 addr->sib_pkey = (__force __be16) resp.pkey; in ucma_query_gid()
989 addr = (struct sockaddr_ib *) &resp.dst_addr; in ucma_query_gid()
990 resp.dst_size = sizeof(*addr); in ucma_query_gid()
992 memcpy(addr, &ctx->cm_id->route.addr.dst_addr, resp.dst_size); in ucma_query_gid()
995 addr->sib_pkey = (__force __be16) resp.pkey; in ucma_query_gid()
1002 if (copy_to_user(response, &resp, sizeof(resp))) in ucma_query_gid()
1177 struct ib_uverbs_qp_attr resp; in ucma_init_qp_attr() local
1182 if (out_len < sizeof(resp)) in ucma_init_qp_attr()
1195 resp.qp_attr_mask = 0; in ucma_init_qp_attr()
1198 ret = rdma_init_qp_attr(ctx->cm_id, &qp_attr, &resp.qp_attr_mask); in ucma_init_qp_attr()
1202 ib_copy_qp_attr_to_user(ctx->cm_id->device, &resp, &qp_attr); in ucma_init_qp_attr()
1204 &resp, sizeof(resp))) in ucma_init_qp_attr()
1382 struct rdma_ucm_create_id_resp resp; in ucma_process_join() local
1389 if (out_len < sizeof(resp)) in ucma_process_join()
1421 resp.id = mc->id; in ucma_process_join()
1423 &resp, sizeof(resp))) { in ucma_process_join()
1494 struct rdma_ucm_destroy_id_resp resp; in ucma_leave_multicast() local
1498 if (out_len < sizeof(resp)) in ucma_leave_multicast()
1528 resp.events_reported = mc->events_reported; in ucma_leave_multicast()
1532 &resp, sizeof(resp))) in ucma_leave_multicast()
1575 struct rdma_ucm_migrate_resp resp; in ucma_migrate_id() local
1602 resp.events_reported = ctx->events_reported; in ucma_migrate_id()
1616 resp.events_reported = ctx->events_reported; in ucma_migrate_id()
1623 &resp, sizeof(resp))) in ucma_migrate_id()