Lines Matching refs:resp

73 	struct ib_uverbs_get_context_resp resp;  in ib_uverbs_get_context()  local
81 if (out_len < sizeof resp) in ib_uverbs_get_context()
101 u64_to_user_ptr(cmd.response) + sizeof(resp), in ib_uverbs_get_context()
103 out_len - sizeof(resp)); in ib_uverbs_get_context()
137 resp.num_comp_vectors = file->device->num_comp_vectors; in ib_uverbs_get_context()
142 resp.async_fd = ret; in ib_uverbs_get_context()
150 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof resp)) { in ib_uverbs_get_context()
155 fd_install(resp.async_fd, filp); in ib_uverbs_get_context()
172 put_unused_fd(resp.async_fd); in ib_uverbs_get_context()
187 struct ib_uverbs_query_device_resp *resp, in copy_query_dev_fields() argument
192 resp->fw_ver = attr->fw_ver; in copy_query_dev_fields()
193 resp->node_guid = ib_dev->node_guid; in copy_query_dev_fields()
194 resp->sys_image_guid = attr->sys_image_guid; in copy_query_dev_fields()
195 resp->max_mr_size = attr->max_mr_size; in copy_query_dev_fields()
196 resp->page_size_cap = attr->page_size_cap; in copy_query_dev_fields()
197 resp->vendor_id = attr->vendor_id; in copy_query_dev_fields()
198 resp->vendor_part_id = attr->vendor_part_id; in copy_query_dev_fields()
199 resp->hw_ver = attr->hw_ver; in copy_query_dev_fields()
200 resp->max_qp = attr->max_qp; in copy_query_dev_fields()
201 resp->max_qp_wr = attr->max_qp_wr; in copy_query_dev_fields()
202 resp->device_cap_flags = lower_32_bits(attr->device_cap_flags); in copy_query_dev_fields()
203 resp->max_sge = min(attr->max_send_sge, attr->max_recv_sge); in copy_query_dev_fields()
204 resp->max_sge_rd = attr->max_sge_rd; in copy_query_dev_fields()
205 resp->max_cq = attr->max_cq; in copy_query_dev_fields()
206 resp->max_cqe = attr->max_cqe; in copy_query_dev_fields()
207 resp->max_mr = attr->max_mr; in copy_query_dev_fields()
208 resp->max_pd = attr->max_pd; in copy_query_dev_fields()
209 resp->max_qp_rd_atom = attr->max_qp_rd_atom; in copy_query_dev_fields()
210 resp->max_ee_rd_atom = attr->max_ee_rd_atom; in copy_query_dev_fields()
211 resp->max_res_rd_atom = attr->max_res_rd_atom; in copy_query_dev_fields()
212 resp->max_qp_init_rd_atom = attr->max_qp_init_rd_atom; in copy_query_dev_fields()
213 resp->max_ee_init_rd_atom = attr->max_ee_init_rd_atom; in copy_query_dev_fields()
214 resp->atomic_cap = attr->atomic_cap; in copy_query_dev_fields()
215 resp->max_ee = attr->max_ee; in copy_query_dev_fields()
216 resp->max_rdd = attr->max_rdd; in copy_query_dev_fields()
217 resp->max_mw = attr->max_mw; in copy_query_dev_fields()
218 resp->max_raw_ipv6_qp = attr->max_raw_ipv6_qp; in copy_query_dev_fields()
219 resp->max_raw_ethy_qp = attr->max_raw_ethy_qp; in copy_query_dev_fields()
220 resp->max_mcast_grp = attr->max_mcast_grp; in copy_query_dev_fields()
221 resp->max_mcast_qp_attach = attr->max_mcast_qp_attach; in copy_query_dev_fields()
222 resp->max_total_mcast_qp_attach = attr->max_total_mcast_qp_attach; in copy_query_dev_fields()
223 resp->max_ah = attr->max_ah; in copy_query_dev_fields()
224 resp->max_fmr = attr->max_fmr; in copy_query_dev_fields()
225 resp->max_map_per_fmr = attr->max_map_per_fmr; in copy_query_dev_fields()
226 resp->max_srq = attr->max_srq; in copy_query_dev_fields()
227 resp->max_srq_wr = attr->max_srq_wr; in copy_query_dev_fields()
228 resp->max_srq_sge = attr->max_srq_sge; in copy_query_dev_fields()
229 resp->max_pkeys = attr->max_pkeys; in copy_query_dev_fields()
230 resp->local_ca_ack_delay = attr->local_ca_ack_delay; in copy_query_dev_fields()
231 resp->phys_port_cnt = ib_dev->phys_port_cnt; in copy_query_dev_fields()
239 struct ib_uverbs_query_device_resp resp; in ib_uverbs_query_device() local
246 if (out_len < sizeof resp) in ib_uverbs_query_device()
252 memset(&resp, 0, sizeof resp); in ib_uverbs_query_device()
253 copy_query_dev_fields(ucontext, &resp, &ucontext->device->attrs); in ib_uverbs_query_device()
255 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof resp)) in ib_uverbs_query_device()
287 struct ib_uverbs_query_port_resp resp; in ib_uverbs_query_port() local
298 if (out_len < sizeof resp) in ib_uverbs_query_port()
308 memset(&resp, 0, sizeof resp); in ib_uverbs_query_port()
310 resp.state = attr.state; in ib_uverbs_query_port()
311 resp.max_mtu = attr.max_mtu; in ib_uverbs_query_port()
312 resp.active_mtu = attr.active_mtu; in ib_uverbs_query_port()
313 resp.gid_tbl_len = attr.gid_tbl_len; in ib_uverbs_query_port()
314 resp.port_cap_flags = make_port_cap_flags(&attr); in ib_uverbs_query_port()
315 resp.max_msg_sz = attr.max_msg_sz; in ib_uverbs_query_port()
316 resp.bad_pkey_cntr = attr.bad_pkey_cntr; in ib_uverbs_query_port()
317 resp.qkey_viol_cntr = attr.qkey_viol_cntr; in ib_uverbs_query_port()
318 resp.pkey_tbl_len = attr.pkey_tbl_len; in ib_uverbs_query_port()
321 resp.flags |= IB_UVERBS_QPF_GRH_REQUIRED; in ib_uverbs_query_port()
324 resp.lid = OPA_TO_IB_UCAST_LID(attr.lid); in ib_uverbs_query_port()
325 resp.sm_lid = OPA_TO_IB_UCAST_LID(attr.sm_lid); in ib_uverbs_query_port()
327 resp.lid = ib_lid_cpu16(attr.lid); in ib_uverbs_query_port()
328 resp.sm_lid = ib_lid_cpu16(attr.sm_lid); in ib_uverbs_query_port()
330 resp.lmc = attr.lmc; in ib_uverbs_query_port()
331 resp.max_vl_num = attr.max_vl_num; in ib_uverbs_query_port()
332 resp.sm_sl = attr.sm_sl; in ib_uverbs_query_port()
333 resp.subnet_timeout = attr.subnet_timeout; in ib_uverbs_query_port()
334 resp.init_type_reply = attr.init_type_reply; in ib_uverbs_query_port()
335 resp.active_width = attr.active_width; in ib_uverbs_query_port()
336 resp.active_speed = attr.active_speed; in ib_uverbs_query_port()
337 resp.phys_state = attr.phys_state; in ib_uverbs_query_port()
338 resp.link_layer = rdma_port_get_link_layer(ib_dev, in ib_uverbs_query_port()
341 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof resp)) in ib_uverbs_query_port()
352 struct ib_uverbs_alloc_pd_resp resp; in ib_uverbs_alloc_pd() local
359 if (out_len < sizeof resp) in ib_uverbs_alloc_pd()
366 u64_to_user_ptr(cmd.response) + sizeof(resp), in ib_uverbs_alloc_pd()
368 out_len - sizeof(resp)); in ib_uverbs_alloc_pd()
386 memset(&resp, 0, sizeof resp); in ib_uverbs_alloc_pd()
387 resp.pd_handle = uobj->id; in ib_uverbs_alloc_pd()
391 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof resp)) { in ib_uverbs_alloc_pd()
509 struct ib_uverbs_open_xrcd_resp resp; in ib_uverbs_open_xrcd() local
519 if (out_len < sizeof resp) in ib_uverbs_open_xrcd()
526 u64_to_user_ptr(cmd.response) + sizeof(resp), in ib_uverbs_open_xrcd()
528 out_len - sizeof(resp)); in ib_uverbs_open_xrcd()
578 memset(&resp, 0, sizeof resp); in ib_uverbs_open_xrcd()
579 resp.xrcd_handle = obj->uobject.id; in ib_uverbs_open_xrcd()
591 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof resp)) { in ib_uverbs_open_xrcd()
668 struct ib_uverbs_reg_mr_resp resp; in ib_uverbs_reg_mr() local
676 if (out_len < sizeof resp) in ib_uverbs_reg_mr()
683 u64_to_user_ptr(cmd.response) + sizeof(resp), in ib_uverbs_reg_mr()
685 out_len - sizeof(resp)); in ib_uverbs_reg_mr()
730 memset(&resp, 0, sizeof resp); in ib_uverbs_reg_mr()
731 resp.lkey = mr->lkey; in ib_uverbs_reg_mr()
732 resp.rkey = mr->rkey; in ib_uverbs_reg_mr()
733 resp.mr_handle = uobj->id; in ib_uverbs_reg_mr()
735 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof resp)) { in ib_uverbs_reg_mr()
760 struct ib_uverbs_rereg_mr_resp resp; in ib_uverbs_rereg_mr() local
768 if (out_len < sizeof(resp)) in ib_uverbs_rereg_mr()
775 u64_to_user_ptr(cmd.response) + sizeof(resp), in ib_uverbs_rereg_mr()
777 out_len - sizeof(resp)); in ib_uverbs_rereg_mr()
827 memset(&resp, 0, sizeof(resp)); in ib_uverbs_rereg_mr()
828 resp.lkey = mr->lkey; in ib_uverbs_rereg_mr()
829 resp.rkey = mr->rkey; in ib_uverbs_rereg_mr()
831 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof(resp))) in ib_uverbs_rereg_mr()
864 struct ib_uverbs_alloc_mw_resp resp; in ib_uverbs_alloc_mw() local
872 if (out_len < sizeof(resp)) in ib_uverbs_alloc_mw()
889 u64_to_user_ptr(cmd.response) + sizeof(resp), in ib_uverbs_alloc_mw()
891 out_len - sizeof(resp)); in ib_uverbs_alloc_mw()
906 memset(&resp, 0, sizeof(resp)); in ib_uverbs_alloc_mw()
907 resp.rkey = mw->rkey; in ib_uverbs_alloc_mw()
908 resp.mw_handle = uobj->id; in ib_uverbs_alloc_mw()
910 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof(resp))) { in ib_uverbs_alloc_mw()
945 struct ib_uverbs_create_comp_channel_resp resp; in ib_uverbs_create_comp_channel() local
950 if (out_len < sizeof resp) in ib_uverbs_create_comp_channel()
960 resp.fd = uobj->id; in ib_uverbs_create_comp_channel()
966 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof resp)) { in ib_uverbs_create_comp_channel()
981 struct ib_uverbs_ex_create_cq_resp *resp, in create_cq() argument
990 struct ib_uverbs_ex_create_cq_resp resp; in create_cq() local
1041 memset(&resp, 0, sizeof resp); in create_cq()
1042 resp.base.cq_handle = obj->uobject.id; in create_cq()
1043 resp.base.cqe = cq->cqe; in create_cq()
1045 resp.response_length = offsetof(typeof(resp), response_length) + in create_cq()
1046 sizeof(resp.response_length); in create_cq()
1051 ret = cb(file, obj, &resp, ucore, context); in create_cq()
1075 struct ib_uverbs_ex_create_cq_resp *resp, in ib_uverbs_create_cq_cb() argument
1078 if (ib_copy_to_udata(ucore, &resp->base, sizeof(resp->base))) in ib_uverbs_create_cq_cb()
1090 struct ib_uverbs_create_cq_resp resp; in ib_uverbs_create_cq() local
1095 if (out_len < sizeof(resp)) in ib_uverbs_create_cq()
1102 sizeof(cmd), sizeof(resp)); in ib_uverbs_create_cq()
1105 u64_to_user_ptr(cmd.response) + sizeof(resp), in ib_uverbs_create_cq()
1107 out_len - sizeof(resp)); in ib_uverbs_create_cq()
1128 struct ib_uverbs_ex_create_cq_resp *resp, in ib_uverbs_ex_create_cq_cb() argument
1131 if (ib_copy_to_udata(ucore, resp, resp->response_length)) in ib_uverbs_ex_create_cq_cb()
1141 struct ib_uverbs_ex_create_cq_resp resp; in ib_uverbs_ex_create_cq() local
1159 if (ucore->outlen < (offsetof(typeof(resp), response_length) + in ib_uverbs_ex_create_cq()
1160 sizeof(resp.response_length))) in ib_uverbs_ex_create_cq()
1175 struct ib_uverbs_resize_cq_resp resp = {}; in ib_uverbs_resize_cq() local
1184 u64_to_user_ptr(cmd.response) + sizeof(resp), in ib_uverbs_resize_cq()
1186 out_len - sizeof(resp)); in ib_uverbs_resize_cq()
1196 resp.cqe = cq->cqe; in ib_uverbs_resize_cq()
1198 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof resp.cqe)) in ib_uverbs_resize_cq()
1242 struct ib_uverbs_poll_cq_resp resp; in ib_uverbs_poll_cq() local
1258 data_ptr = header_ptr + sizeof resp; in ib_uverbs_poll_cq()
1260 memset(&resp, 0, sizeof resp); in ib_uverbs_poll_cq()
1261 while (resp.count < cmd.ne) { in ib_uverbs_poll_cq()
1273 ++resp.count; in ib_uverbs_poll_cq()
1276 if (copy_to_user(header_ptr, &resp, sizeof resp)) { in ib_uverbs_poll_cq()
1315 struct ib_uverbs_destroy_cq_resp resp; in ib_uverbs_destroy_cq() local
1327 memset(&resp, 0, sizeof(resp)); in ib_uverbs_destroy_cq()
1328 resp.comp_events_reported = obj->comp_events_reported; in ib_uverbs_destroy_cq()
1329 resp.async_events_reported = obj->async_events_reported; in ib_uverbs_destroy_cq()
1333 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof resp)) in ib_uverbs_destroy_cq()
1345 struct ib_uverbs_ex_create_qp_resp *resp, in create_qp() argument
1359 struct ib_uverbs_ex_create_qp_resp resp; in create_qp() local
1559 memset(&resp, 0, sizeof resp); in create_qp()
1560 resp.base.qpn = qp->qp_num; in create_qp()
1561 resp.base.qp_handle = obj->uevent.uobject.id; in create_qp()
1562 resp.base.max_recv_sge = attr.cap.max_recv_sge; in create_qp()
1563 resp.base.max_send_sge = attr.cap.max_send_sge; in create_qp()
1564 resp.base.max_recv_wr = attr.cap.max_recv_wr; in create_qp()
1565 resp.base.max_send_wr = attr.cap.max_send_wr; in create_qp()
1566 resp.base.max_inline_data = attr.cap.max_inline_data; in create_qp()
1568 resp.response_length = offsetof(typeof(resp), response_length) + in create_qp()
1569 sizeof(resp.response_length); in create_qp()
1571 ret = cb(file, &resp, ucore); in create_qp()
1616 struct ib_uverbs_ex_create_qp_resp *resp, in ib_uverbs_create_qp_cb() argument
1619 if (ib_copy_to_udata(ucore, &resp->base, sizeof(resp->base))) in ib_uverbs_create_qp_cb()
1676 struct ib_uverbs_ex_create_qp_resp *resp, in ib_uverbs_ex_create_qp_cb() argument
1679 if (ib_copy_to_udata(ucore, resp, resp->response_length)) in ib_uverbs_ex_create_qp_cb()
1689 struct ib_uverbs_ex_create_qp_resp resp; in ib_uverbs_ex_create_qp() local
1707 if (ucore->outlen < (offsetof(typeof(resp), response_length) + in ib_uverbs_ex_create_qp()
1708 sizeof(resp.response_length))) in ib_uverbs_ex_create_qp()
1725 struct ib_uverbs_create_qp_resp resp; in ib_uverbs_open_qp() local
1735 if (out_len < sizeof resp) in ib_uverbs_open_qp()
1742 u64_to_user_ptr(cmd.response) + sizeof(resp), in ib_uverbs_open_qp()
1744 out_len - sizeof(resp)); in ib_uverbs_open_qp()
1781 memset(&resp, 0, sizeof resp); in ib_uverbs_open_qp()
1782 resp.qpn = qp->qp_num; in ib_uverbs_open_qp()
1783 resp.qp_handle = obj->uevent.uobject.id; in ib_uverbs_open_qp()
1785 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof resp)) { in ib_uverbs_open_qp()
1833 struct ib_uverbs_query_qp_resp resp; in ib_uverbs_query_qp() local
1862 memset(&resp, 0, sizeof resp); in ib_uverbs_query_qp()
1864 resp.qp_state = attr->qp_state; in ib_uverbs_query_qp()
1865 resp.cur_qp_state = attr->cur_qp_state; in ib_uverbs_query_qp()
1866 resp.path_mtu = attr->path_mtu; in ib_uverbs_query_qp()
1867 resp.path_mig_state = attr->path_mig_state; in ib_uverbs_query_qp()
1868 resp.qkey = attr->qkey; in ib_uverbs_query_qp()
1869 resp.rq_psn = attr->rq_psn; in ib_uverbs_query_qp()
1870 resp.sq_psn = attr->sq_psn; in ib_uverbs_query_qp()
1871 resp.dest_qp_num = attr->dest_qp_num; in ib_uverbs_query_qp()
1872 resp.qp_access_flags = attr->qp_access_flags; in ib_uverbs_query_qp()
1873 resp.pkey_index = attr->pkey_index; in ib_uverbs_query_qp()
1874 resp.alt_pkey_index = attr->alt_pkey_index; in ib_uverbs_query_qp()
1875 resp.sq_draining = attr->sq_draining; in ib_uverbs_query_qp()
1876 resp.max_rd_atomic = attr->max_rd_atomic; in ib_uverbs_query_qp()
1877 resp.max_dest_rd_atomic = attr->max_dest_rd_atomic; in ib_uverbs_query_qp()
1878 resp.min_rnr_timer = attr->min_rnr_timer; in ib_uverbs_query_qp()
1879 resp.port_num = attr->port_num; in ib_uverbs_query_qp()
1880 resp.timeout = attr->timeout; in ib_uverbs_query_qp()
1881 resp.retry_cnt = attr->retry_cnt; in ib_uverbs_query_qp()
1882 resp.rnr_retry = attr->rnr_retry; in ib_uverbs_query_qp()
1883 resp.alt_port_num = attr->alt_port_num; in ib_uverbs_query_qp()
1884 resp.alt_timeout = attr->alt_timeout; in ib_uverbs_query_qp()
1886 copy_ah_attr_to_uverbs(&resp.dest, &attr->ah_attr); in ib_uverbs_query_qp()
1887 copy_ah_attr_to_uverbs(&resp.alt_dest, &attr->alt_ah_attr); in ib_uverbs_query_qp()
1889 resp.max_send_wr = init_attr->cap.max_send_wr; in ib_uverbs_query_qp()
1890 resp.max_recv_wr = init_attr->cap.max_recv_wr; in ib_uverbs_query_qp()
1891 resp.max_send_sge = init_attr->cap.max_send_sge; in ib_uverbs_query_qp()
1892 resp.max_recv_sge = init_attr->cap.max_recv_sge; in ib_uverbs_query_qp()
1893 resp.max_inline_data = init_attr->cap.max_inline_data; in ib_uverbs_query_qp()
1894 resp.sq_sig_all = init_attr->sq_sig_type == IB_SIGNAL_ALL_WR; in ib_uverbs_query_qp()
1896 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof resp)) in ib_uverbs_query_qp()
2167 struct ib_uverbs_destroy_qp_resp resp; in ib_uverbs_destroy_qp() local
2179 memset(&resp, 0, sizeof(resp)); in ib_uverbs_destroy_qp()
2180 resp.events_reported = obj->uevent.events_reported; in ib_uverbs_destroy_qp()
2184 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof resp)) in ib_uverbs_destroy_qp()
2205 struct ib_uverbs_post_send_resp resp; in ib_uverbs_post_send() local
2359 resp.bad_wr = 0; in ib_uverbs_post_send()
2363 ++resp.bad_wr; in ib_uverbs_post_send()
2368 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof resp)) in ib_uverbs_post_send()
2485 struct ib_uverbs_post_recv_resp resp; in ib_uverbs_post_recv() local
2504 resp.bad_wr = 0; in ib_uverbs_post_recv()
2510 ++resp.bad_wr; in ib_uverbs_post_recv()
2516 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof resp)) in ib_uverbs_post_recv()
2534 struct ib_uverbs_post_srq_recv_resp resp; in ib_uverbs_post_srq_recv() local
2553 resp.bad_wr = 0; in ib_uverbs_post_srq_recv()
2561 ++resp.bad_wr; in ib_uverbs_post_srq_recv()
2566 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof resp)) in ib_uverbs_post_srq_recv()
2584 struct ib_uverbs_create_ah_resp resp; in ib_uverbs_create_ah() local
2593 if (out_len < sizeof resp) in ib_uverbs_create_ah()
2600 u64_to_user_ptr(cmd.response) + sizeof(resp), in ib_uverbs_create_ah()
2602 out_len - sizeof(resp)); in ib_uverbs_create_ah()
2647 resp.ah_handle = uobj->id; in ib_uverbs_create_ah()
2649 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof resp)) { in ib_uverbs_create_ah()
3102 struct ib_uverbs_ex_create_wq_resp resp = {}; in ib_uverbs_ex_create_wq() local
3114 required_resp_len = offsetof(typeof(resp), wqn) + sizeof(resp.wqn); in ib_uverbs_ex_create_wq()
3186 memset(&resp, 0, sizeof(resp)); in ib_uverbs_ex_create_wq()
3187 resp.wq_handle = obj->uevent.uobject.id; in ib_uverbs_ex_create_wq()
3188 resp.max_sge = wq_init_attr.max_sge; in ib_uverbs_ex_create_wq()
3189 resp.max_wr = wq_init_attr.max_wr; in ib_uverbs_ex_create_wq()
3190 resp.wqn = wq->wq_num; in ib_uverbs_ex_create_wq()
3191 resp.response_length = required_resp_len; in ib_uverbs_ex_create_wq()
3193 &resp, resp.response_length); in ib_uverbs_ex_create_wq()
3218 struct ib_uverbs_ex_destroy_wq_resp resp = {}; in ib_uverbs_ex_destroy_wq() local
3226 required_resp_len = offsetof(typeof(resp), reserved) + sizeof(resp.reserved); in ib_uverbs_ex_destroy_wq()
3246 resp.response_length = required_resp_len; in ib_uverbs_ex_destroy_wq()
3252 resp.events_reported = obj->uevent.events_reported; in ib_uverbs_ex_destroy_wq()
3256 return ib_copy_to_udata(ucore, &resp, resp.response_length); in ib_uverbs_ex_destroy_wq()
3313 struct ib_uverbs_ex_create_rwq_ind_table_resp resp = {}; in ib_uverbs_ex_create_rwq_ind_table() local
3329 required_resp_len = offsetof(typeof(resp), ind_tbl_num) + sizeof(resp.ind_tbl_num); in ib_uverbs_ex_create_rwq_ind_table()
3422 resp.ind_tbl_handle = uobj->id; in ib_uverbs_ex_create_rwq_ind_table()
3423 resp.ind_tbl_num = rwq_ind_tbl->ind_tbl_num; in ib_uverbs_ex_create_rwq_ind_table()
3424 resp.response_length = required_resp_len; in ib_uverbs_ex_create_rwq_ind_table()
3427 &resp, resp.response_length); in ib_uverbs_ex_create_rwq_ind_table()
3485 struct ib_uverbs_create_flow_resp resp; in ib_uverbs_ex_create_flow() local
3502 if (ucore->outlen < sizeof(resp)) in ib_uverbs_ex_create_flow()
3634 memset(&resp, 0, sizeof(resp)); in ib_uverbs_ex_create_flow()
3635 resp.flow_handle = uobj->id; in ib_uverbs_ex_create_flow()
3638 &resp, sizeof(resp)); in ib_uverbs_ex_create_flow()
3689 struct ib_uverbs_create_srq_resp resp; in __uverbs_create_xsrq() local
3778 memset(&resp, 0, sizeof resp); in __uverbs_create_xsrq()
3779 resp.srq_handle = obj->uevent.uobject.id; in __uverbs_create_xsrq()
3780 resp.max_wr = attr.attr.max_wr; in __uverbs_create_xsrq()
3781 resp.max_sge = attr.attr.max_sge; in __uverbs_create_xsrq()
3783 resp.srqn = srq->ext.xrc.srq_num; in __uverbs_create_xsrq()
3786 &resp, sizeof resp)) { in __uverbs_create_xsrq()
3827 struct ib_uverbs_create_srq_resp resp; in ib_uverbs_create_srq() local
3831 if (out_len < sizeof resp) in ib_uverbs_create_srq()
3847 u64_to_user_ptr(cmd.response) + sizeof(resp), in ib_uverbs_create_srq()
3849 out_len - sizeof(resp)); in ib_uverbs_create_srq()
3862 struct ib_uverbs_create_srq_resp resp; in ib_uverbs_create_xsrq() local
3866 if (out_len < sizeof resp) in ib_uverbs_create_xsrq()
3873 u64_to_user_ptr(cmd.response) + sizeof(resp), in ib_uverbs_create_xsrq()
3875 out_len - sizeof(resp)); in ib_uverbs_create_xsrq()
3919 struct ib_uverbs_query_srq_resp resp; in ib_uverbs_query_srq() local
3924 if (out_len < sizeof resp) in ib_uverbs_query_srq()
3941 memset(&resp, 0, sizeof resp); in ib_uverbs_query_srq()
3943 resp.max_wr = attr.max_wr; in ib_uverbs_query_srq()
3944 resp.max_sge = attr.max_sge; in ib_uverbs_query_srq()
3945 resp.srq_limit = attr.srq_limit; in ib_uverbs_query_srq()
3947 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof resp)) in ib_uverbs_query_srq()
3958 struct ib_uverbs_destroy_srq_resp resp; in ib_uverbs_destroy_srq() local
3970 memset(&resp, 0, sizeof(resp)); in ib_uverbs_destroy_srq()
3971 resp.events_reported = obj->events_reported; in ib_uverbs_destroy_srq()
3975 if (copy_to_user(u64_to_user_ptr(cmd.response), &resp, sizeof(resp))) in ib_uverbs_destroy_srq()
3985 struct ib_uverbs_ex_query_device_resp resp = { {0} }; in ib_uverbs_ex_query_device() local
4013 resp.response_length = offsetof(typeof(resp), odp_caps); in ib_uverbs_ex_query_device()
4015 if (ucore->outlen < resp.response_length) in ib_uverbs_ex_query_device()
4022 copy_query_dev_fields(ucontext, &resp.base, &attr); in ib_uverbs_ex_query_device()
4024 if (ucore->outlen < resp.response_length + sizeof(resp.odp_caps)) in ib_uverbs_ex_query_device()
4028 resp.odp_caps.general_caps = attr.odp_caps.general_caps; in ib_uverbs_ex_query_device()
4029 resp.odp_caps.per_transport_caps.rc_odp_caps = in ib_uverbs_ex_query_device()
4031 resp.odp_caps.per_transport_caps.uc_odp_caps = in ib_uverbs_ex_query_device()
4033 resp.odp_caps.per_transport_caps.ud_odp_caps = in ib_uverbs_ex_query_device()
4036 resp.response_length += sizeof(resp.odp_caps); in ib_uverbs_ex_query_device()
4038 if (ucore->outlen < resp.response_length + sizeof(resp.timestamp_mask)) in ib_uverbs_ex_query_device()
4041 resp.timestamp_mask = attr.timestamp_mask; in ib_uverbs_ex_query_device()
4042 resp.response_length += sizeof(resp.timestamp_mask); in ib_uverbs_ex_query_device()
4044 if (ucore->outlen < resp.response_length + sizeof(resp.hca_core_clock)) in ib_uverbs_ex_query_device()
4047 resp.hca_core_clock = attr.hca_core_clock; in ib_uverbs_ex_query_device()
4048 resp.response_length += sizeof(resp.hca_core_clock); in ib_uverbs_ex_query_device()
4050 if (ucore->outlen < resp.response_length + sizeof(resp.device_cap_flags_ex)) in ib_uverbs_ex_query_device()
4053 resp.device_cap_flags_ex = attr.device_cap_flags; in ib_uverbs_ex_query_device()
4054 resp.response_length += sizeof(resp.device_cap_flags_ex); in ib_uverbs_ex_query_device()
4056 if (ucore->outlen < resp.response_length + sizeof(resp.rss_caps)) in ib_uverbs_ex_query_device()
4059 resp.rss_caps.supported_qpts = attr.rss_caps.supported_qpts; in ib_uverbs_ex_query_device()
4060 resp.rss_caps.max_rwq_indirection_tables = in ib_uverbs_ex_query_device()
4062 resp.rss_caps.max_rwq_indirection_table_size = in ib_uverbs_ex_query_device()
4065 resp.response_length += sizeof(resp.rss_caps); in ib_uverbs_ex_query_device()
4067 if (ucore->outlen < resp.response_length + sizeof(resp.max_wq_type_rq)) in ib_uverbs_ex_query_device()
4070 resp.max_wq_type_rq = attr.max_wq_type_rq; in ib_uverbs_ex_query_device()
4071 resp.response_length += sizeof(resp.max_wq_type_rq); in ib_uverbs_ex_query_device()
4073 if (ucore->outlen < resp.response_length + sizeof(resp.raw_packet_caps)) in ib_uverbs_ex_query_device()
4076 resp.raw_packet_caps = attr.raw_packet_caps; in ib_uverbs_ex_query_device()
4077 resp.response_length += sizeof(resp.raw_packet_caps); in ib_uverbs_ex_query_device()
4079 if (ucore->outlen < resp.response_length + sizeof(resp.tm_caps)) in ib_uverbs_ex_query_device()
4082 resp.tm_caps.max_rndv_hdr_size = attr.tm_caps.max_rndv_hdr_size; in ib_uverbs_ex_query_device()
4083 resp.tm_caps.max_num_tags = attr.tm_caps.max_num_tags; in ib_uverbs_ex_query_device()
4084 resp.tm_caps.max_ops = attr.tm_caps.max_ops; in ib_uverbs_ex_query_device()
4085 resp.tm_caps.max_sge = attr.tm_caps.max_sge; in ib_uverbs_ex_query_device()
4086 resp.tm_caps.flags = attr.tm_caps.flags; in ib_uverbs_ex_query_device()
4087 resp.response_length += sizeof(resp.tm_caps); in ib_uverbs_ex_query_device()
4089 if (ucore->outlen < resp.response_length + sizeof(resp.cq_moderation_caps)) in ib_uverbs_ex_query_device()
4092 resp.cq_moderation_caps.max_cq_moderation_count = in ib_uverbs_ex_query_device()
4094 resp.cq_moderation_caps.max_cq_moderation_period = in ib_uverbs_ex_query_device()
4096 resp.response_length += sizeof(resp.cq_moderation_caps); in ib_uverbs_ex_query_device()
4098 if (ucore->outlen < resp.response_length + sizeof(resp.max_dm_size)) in ib_uverbs_ex_query_device()
4101 resp.max_dm_size = attr.max_dm_size; in ib_uverbs_ex_query_device()
4102 resp.response_length += sizeof(resp.max_dm_size); in ib_uverbs_ex_query_device()
4104 err = ib_copy_to_udata(ucore, &resp, resp.response_length); in ib_uverbs_ex_query_device()