Lines Matching refs:resp

278 	struct ib_uverbs_get_context_resp resp;
285 if (out_len < sizeof resp)
299 (unsigned long) cmd.response + sizeof resp,
300 in_len - sizeof cmd, out_len - sizeof resp);
319 resp.num_comp_vectors = file->device->num_comp_vectors;
321 filp = ib_uverbs_alloc_event_file(file, 1, &resp.async_fd);
328 &resp, sizeof resp)) {
345 fd_install(resp.async_fd, filp);
352 put_unused_fd(resp.async_fd);
368 struct ib_uverbs_query_device_resp resp;
372 if (out_len < sizeof resp)
382 memset(&resp, 0, sizeof resp);
384 resp.fw_ver = attr.fw_ver;
385 resp.node_guid = file->device->ib_dev->node_guid;
386 resp.sys_image_guid = attr.sys_image_guid;
387 resp.max_mr_size = attr.max_mr_size;
388 resp.page_size_cap = attr.page_size_cap;
389 resp.vendor_id = attr.vendor_id;
390 resp.vendor_part_id = attr.vendor_part_id;
391 resp.hw_ver = attr.hw_ver;
392 resp.max_qp = attr.max_qp;
393 resp.max_qp_wr = attr.max_qp_wr;
394 resp.device_cap_flags = attr.device_cap_flags;
395 resp.max_sge = attr.max_sge;
396 resp.max_sge_rd = attr.max_sge_rd;
397 resp.max_cq = attr.max_cq;
398 resp.max_cqe = attr.max_cqe;
399 resp.max_mr = attr.max_mr;
400 resp.max_pd = attr.max_pd;
401 resp.max_qp_rd_atom = attr.max_qp_rd_atom;
402 resp.max_ee_rd_atom = attr.max_ee_rd_atom;
403 resp.max_res_rd_atom = attr.max_res_rd_atom;
404 resp.max_qp_init_rd_atom = attr.max_qp_init_rd_atom;
405 resp.max_ee_init_rd_atom = attr.max_ee_init_rd_atom;
406 resp.atomic_cap = attr.atomic_cap;
407 resp.max_ee = attr.max_ee;
408 resp.max_rdd = attr.max_rdd;
409 resp.max_mw = attr.max_mw;
410 resp.max_raw_ipv6_qp = attr.max_raw_ipv6_qp;
411 resp.max_raw_ethy_qp = attr.max_raw_ethy_qp;
412 resp.max_mcast_grp = attr.max_mcast_grp;
413 resp.max_mcast_qp_attach = attr.max_mcast_qp_attach;
414 resp.max_total_mcast_qp_attach = attr.max_total_mcast_qp_attach;
415 resp.max_ah = attr.max_ah;
416 resp.max_fmr = attr.max_fmr;
417 resp.max_map_per_fmr = attr.max_map_per_fmr;
418 resp.max_srq = attr.max_srq;
419 resp.max_srq_wr = attr.max_srq_wr;
420 resp.max_srq_sge = attr.max_srq_sge;
421 resp.max_pkeys = attr.max_pkeys;
422 resp.local_ca_ack_delay = attr.local_ca_ack_delay;
423 resp.phys_port_cnt = file->device->ib_dev->phys_port_cnt;
426 &resp, sizeof resp))
437 struct ib_uverbs_query_port_resp resp;
441 if (out_len < sizeof resp)
451 memset(&resp, 0, sizeof resp);
453 resp.state = attr.state;
454 resp.max_mtu = attr.max_mtu;
455 resp.active_mtu = attr.active_mtu;
456 resp.gid_tbl_len = attr.gid_tbl_len;
457 resp.port_cap_flags = attr.port_cap_flags;
458 resp.max_msg_sz = attr.max_msg_sz;
459 resp.bad_pkey_cntr = attr.bad_pkey_cntr;
460 resp.qkey_viol_cntr = attr.qkey_viol_cntr;
461 resp.pkey_tbl_len = attr.pkey_tbl_len;
462 resp.lid = attr.lid;
463 resp.sm_lid = attr.sm_lid;
464 resp.lmc = attr.lmc;
465 resp.max_vl_num = attr.max_vl_num;
466 resp.sm_sl = attr.sm_sl;
467 resp.subnet_timeout = attr.subnet_timeout;
468 resp.init_type_reply = attr.init_type_reply;
469 resp.active_width = attr.active_width;
470 resp.active_speed = attr.active_speed;
471 resp.phys_state = attr.phys_state;
472 resp.link_layer = attr.link_layer;
475 &resp, sizeof resp))
486 struct ib_uverbs_alloc_pd_resp resp;
492 if (out_len < sizeof resp)
499 (unsigned long) cmd.response + sizeof resp,
500 in_len - sizeof cmd, out_len - sizeof resp);
525 memset(&resp, 0, sizeof resp);
526 resp.pd_handle = uobj->id;
529 &resp, sizeof resp)) {
595 struct ib_uverbs_reg_mr_resp resp;
602 if (out_len < sizeof resp)
609 (unsigned long) cmd.response + sizeof resp,
610 in_len - sizeof cmd, out_len - sizeof resp);
654 memset(&resp, 0, sizeof resp);
655 resp.lkey = mr->lkey;
656 resp.rkey = mr->rkey;
657 resp.mr_handle = uobj->id;
660 &resp, sizeof resp)) {
734 struct ib_uverbs_create_comp_channel_resp resp;
737 if (out_len < sizeof resp)
743 filp = ib_uverbs_alloc_event_file(file, 0, &resp.fd);
748 &resp, sizeof resp)) {
749 put_unused_fd(resp.fd);
754 fd_install(resp.fd, filp);
763 struct ib_uverbs_create_cq_resp resp;
770 if (out_len < sizeof resp)
777 (unsigned long) cmd.response + sizeof resp,
778 in_len - sizeof cmd, out_len - sizeof resp);
824 memset(&resp, 0, sizeof resp);
825 resp.cq_handle = obj->uobject.id;
826 resp.cqe = cq->cqe;
829 &resp, sizeof resp)) {
864 struct ib_uverbs_resize_cq_resp resp;
873 (unsigned long) cmd.response + sizeof resp,
874 in_len - sizeof cmd, out_len - sizeof resp);
884 resp.cqe = cq->cqe;
887 &resp, sizeof resp.cqe))
901 struct ib_uverbs_poll_cq_resp *resp;
915 rsize = sizeof *resp + cmd.ne * sizeof(struct ib_uverbs_wc);
916 resp = kmalloc(rsize, GFP_KERNEL);
917 if (!resp) {
928 resp->count = ib_poll_cq(cq, cmd.ne, wc);
932 for (i = 0; i < resp->count; i++) {
933 resp->wc[i].wr_id = wc[i].wr_id;
934 resp->wc[i].status = wc[i].status;
935 resp->wc[i].opcode = wc[i].opcode;
936 resp->wc[i].vendor_err = wc[i].vendor_err;
937 resp->wc[i].byte_len = wc[i].byte_len;
938 resp->wc[i].ex.imm_data = (__u32 __force) wc[i].ex.imm_data;
939 resp->wc[i].qp_num = wc[i].qp->qp_num;
940 resp->wc[i].src_qp = wc[i].src_qp;
941 resp->wc[i].wc_flags = wc[i].wc_flags;
942 resp->wc[i].pkey_index = wc[i].pkey_index;
943 resp->wc[i].slid = wc[i].slid;
944 resp->wc[i].sl = wc[i].sl;
945 resp->wc[i].dlid_path_bits = wc[i].dlid_path_bits;
946 resp->wc[i].port_num = wc[i].port_num;
949 if (copy_to_user((void __user *) (unsigned long) cmd.response, resp, rsize))
953 kfree(resp);
987 struct ib_uverbs_destroy_cq_resp resp;
1021 memset(&resp, 0, sizeof resp);
1022 resp.comp_events_reported = obj->comp_events_reported;
1023 resp.async_events_reported = obj->async_events_reported;
1028 &resp, sizeof resp))
1039 struct ib_uverbs_create_qp_resp resp;
1051 if (out_len < sizeof resp)
1058 (unsigned long) cmd.response + sizeof resp,
1059 in_len - sizeof cmd, out_len - sizeof resp);
1133 memset(&resp, 0, sizeof resp);
1134 resp.qpn = qp->qp_num;
1135 resp.qp_handle = obj->uevent.uobject.id;
1136 resp.max_recv_sge = attr.cap.max_recv_sge;
1137 resp.max_send_sge = attr.cap.max_send_sge;
1138 resp.max_recv_wr = attr.cap.max_recv_wr;
1139 resp.max_send_wr = attr.cap.max_send_wr;
1140 resp.max_inline_data = attr.cap.max_inline_data;
1143 &resp, sizeof resp)) {
1194 struct ib_uverbs_query_qp_resp resp;
1223 memset(&resp, 0, sizeof resp);
1225 resp.qp_state = attr->qp_state;
1226 resp.cur_qp_state = attr->cur_qp_state;
1227 resp.path_mtu = attr->path_mtu;
1228 resp.path_mig_state = attr->path_mig_state;
1229 resp.qkey = attr->qkey;
1230 resp.rq_psn = attr->rq_psn;
1231 resp.sq_psn = attr->sq_psn;
1232 resp.dest_qp_num = attr->dest_qp_num;
1233 resp.qp_access_flags = attr->qp_access_flags;
1234 resp.pkey_index = attr->pkey_index;
1235 resp.alt_pkey_index = attr->alt_pkey_index;
1236 resp.sq_draining = attr->sq_draining;
1237 resp.max_rd_atomic = attr->max_rd_atomic;
1238 resp.max_dest_rd_atomic = attr->max_dest_rd_atomic;
1239 resp.min_rnr_timer = attr->min_rnr_timer;
1240 resp.port_num = attr->port_num;
1241 resp.timeout = attr->timeout;
1242 resp.retry_cnt = attr->retry_cnt;
1243 resp.rnr_retry = attr->rnr_retry;
1244 resp.alt_port_num = attr->alt_port_num;
1245 resp.alt_timeout = attr->alt_timeout;
1247 memcpy(resp.dest.dgid, attr->ah_attr.grh.dgid.raw, 16);
1248 resp.dest.flow_label = attr->ah_attr.grh.flow_label;
1249 resp.dest.sgid_index = attr->ah_attr.grh.sgid_index;
1250 resp.dest.hop_limit = attr->ah_attr.grh.hop_limit;
1251 resp.dest.traffic_class = attr->ah_attr.grh.traffic_class;
1252 resp.dest.dlid = attr->ah_attr.dlid;
1253 resp.dest.sl = attr->ah_attr.sl;
1254 resp.dest.src_path_bits = attr->ah_attr.src_path_bits;
1255 resp.dest.static_rate = attr->ah_attr.static_rate;
1256 resp.dest.is_global = !!(attr->ah_attr.ah_flags & IB_AH_GRH);
1257 resp.dest.port_num = attr->ah_attr.port_num;
1259 memcpy(resp.alt_dest.dgid, attr->alt_ah_attr.grh.dgid.raw, 16);
1260 resp.alt_dest.flow_label = attr->alt_ah_attr.grh.flow_label;
1261 resp.alt_dest.sgid_index = attr->alt_ah_attr.grh.sgid_index;
1262 resp.alt_dest.hop_limit = attr->alt_ah_attr.grh.hop_limit;
1263 resp.alt_dest.traffic_class = attr->alt_ah_attr.grh.traffic_class;
1264 resp.alt_dest.dlid = attr->alt_ah_attr.dlid;
1265 resp.alt_dest.sl = attr->alt_ah_attr.sl;
1266 resp.alt_dest.src_path_bits = attr->alt_ah_attr.src_path_bits;
1267 resp.alt_dest.static_rate = attr->alt_ah_attr.static_rate;
1268 resp.alt_dest.is_global = !!(attr->alt_ah_attr.ah_flags & IB_AH_GRH);
1269 resp.alt_dest.port_num = attr->alt_ah_attr.port_num;
1271 resp.max_send_wr = init_attr->cap.max_send_wr;
1272 resp.max_recv_wr = init_attr->cap.max_recv_wr;
1273 resp.max_send_sge = init_attr->cap.max_send_sge;
1274 resp.max_recv_sge = init_attr->cap.max_recv_sge;
1275 resp.max_inline_data = init_attr->cap.max_inline_data;
1276 resp.sq_sig_all = init_attr->sq_sig_type == IB_SIGNAL_ALL_WR;
1279 &resp, sizeof resp))
1381 struct ib_uverbs_destroy_qp_resp resp;
1390 memset(&resp, 0, sizeof resp);
1420 resp.events_reported = obj->uevent.events_reported;
1425 &resp, sizeof resp))
1436 struct ib_uverbs_post_send_resp resp;
1557 resp.bad_wr = 0;
1561 ++resp.bad_wr;
1567 &resp, sizeof resp))
1677 struct ib_uverbs_post_recv_resp resp;
1695 resp.bad_wr = 0;
1702 ++resp.bad_wr;
1708 &resp, sizeof resp))
1726 struct ib_uverbs_post_srq_recv_resp resp;
1744 resp.bad_wr = 0;
1751 ++resp.bad_wr;
1757 &resp, sizeof resp))
1775 struct ib_uverbs_create_ah_resp resp;
1782 if (out_len < sizeof resp)
1826 resp.ah_handle = uobj->id;
1829 &resp, sizeof resp)) {
1985 struct ib_uverbs_create_srq_resp resp;
1993 if (out_len < sizeof resp)
2000 (unsigned long) cmd.response + sizeof resp,
2001 in_len - sizeof cmd, out_len - sizeof resp);
2046 memset(&resp, 0, sizeof resp);
2047 resp.srq_handle = obj->uobject.id;
2048 resp.max_wr = attr.attr.max_wr;
2049 resp.max_sge = attr.attr.max_sge;
2052 &resp, sizeof resp)) {
2088 struct ib_uverbs_create_srq_resp resp;
2099 if (out_len < sizeof resp)
2106 (unsigned long) cmd.response + sizeof resp,
2107 in_len - sizeof cmd, out_len - sizeof resp);
2169 memset(&resp, 0, sizeof resp);
2170 resp.srq_handle = obj->uobject.id;
2171 resp.max_wr = attr.attr.max_wr;
2172 resp.max_sge = attr.attr.max_sge;
2175 &resp, sizeof resp)) {
2249 struct ib_uverbs_query_srq_resp resp;
2254 if (out_len < sizeof resp)
2271 memset(&resp, 0, sizeof resp);
2273 resp.max_wr = attr.max_wr;
2274 resp.max_sge = attr.max_sge;
2275 resp.srq_limit = attr.srq_limit;
2278 &resp, sizeof resp))
2289 struct ib_uverbs_destroy_srq_resp resp;
2321 memset(&resp, 0, sizeof resp);
2322 resp.events_reported = obj->events_reported;
2327 &resp, sizeof resp))
2431 struct ib_uverbs_open_xrc_domain_resp resp;
2441 if (out_len < sizeof resp)
2448 (unsigned long) cmd.response + sizeof resp,
2449 in_len - sizeof cmd, out_len - sizeof resp);
2508 memset(&resp, 0, sizeof resp);
2509 resp.xrcd_handle = uobj->id;
2524 &resp, sizeof resp)) {
2675 struct ib_uverbs_create_xrc_rcv_qp_resp resp;
2684 if (out_len < sizeof resp)
2718 memset(&resp, 0, sizeof resp);
2719 resp.qpn = qp_num;
2722 &resp, sizeof resp)) {
2828 struct ib_uverbs_query_qp_resp resp;
2859 memset(&resp, 0, sizeof resp);
2860 resp.qp_state = attr->qp_state;
2861 resp.cur_qp_state = attr->cur_qp_state;
2862 resp.path_mtu = attr->path_mtu;
2863 resp.path_mig_state = attr->path_mig_state;
2864 resp.qkey = attr->qkey;
2865 resp.rq_psn = attr->rq_psn;
2866 resp.sq_psn = attr->sq_psn;
2867 resp.dest_qp_num = attr->dest_qp_num;
2868 resp.qp_access_flags = attr->qp_access_flags;
2869 resp.pkey_index = attr->pkey_index;
2870 resp.alt_pkey_index = attr->alt_pkey_index;
2871 resp.sq_draining = attr->sq_draining;
2872 resp.max_rd_atomic = attr->max_rd_atomic;
2873 resp.max_dest_rd_atomic = attr->max_dest_rd_atomic;
2874 resp.min_rnr_timer = attr->min_rnr_timer;
2875 resp.port_num = attr->port_num;
2876 resp.timeout = attr->timeout;
2877 resp.retry_cnt = attr->retry_cnt;
2878 resp.rnr_retry = attr->rnr_retry;
2879 resp.alt_port_num = attr->alt_port_num;
2880 resp.alt_timeout = attr->alt_timeout;
2882 memcpy(resp.dest.dgid, attr->ah_attr.grh.dgid.raw, 16);
2883 resp.dest.flow_label = attr->ah_attr.grh.flow_label;
2884 resp.dest.sgid_index = attr->ah_attr.grh.sgid_index;
2885 resp.dest.hop_limit = attr->ah_attr.grh.hop_limit;
2886 resp.dest.traffic_class = attr->ah_attr.grh.traffic_class;
2887 resp.dest.dlid = attr->ah_attr.dlid;
2888 resp.dest.sl = attr->ah_attr.sl;
2889 resp.dest.src_path_bits = attr->ah_attr.src_path_bits;
2890 resp.dest.static_rate = attr->ah_attr.static_rate;
2891 resp.dest.is_global = !!(attr->ah_attr.ah_flags & IB_AH_GRH);
2892 resp.dest.port_num = attr->ah_attr.port_num;
2894 memcpy(resp.alt_dest.dgid, attr->alt_ah_attr.grh.dgid.raw, 16);
2895 resp.alt_dest.flow_label = attr->alt_ah_attr.grh.flow_label;
2896 resp.alt_dest.sgid_index = attr->alt_ah_attr.grh.sgid_index;
2897 resp.alt_dest.hop_limit = attr->alt_ah_attr.grh.hop_limit;
2898 resp.alt_dest.traffic_class = attr->alt_ah_attr.grh.traffic_class;
2899 resp.alt_dest.dlid = attr->alt_ah_attr.dlid;
2900 resp.alt_dest.sl = attr->alt_ah_attr.sl;
2901 resp.alt_dest.src_path_bits = attr->alt_ah_attr.src_path_bits;
2902 resp.alt_dest.static_rate = attr->alt_ah_attr.static_rate;
2903 resp.alt_dest.is_global = !!(attr->alt_ah_attr.ah_flags & IB_AH_GRH);
2904 resp.alt_dest.port_num = attr->alt_ah_attr.port_num;
2906 resp.max_send_wr = init_attr->cap.max_send_wr;
2907 resp.max_recv_wr = init_attr->cap.max_recv_wr;
2908 resp.max_send_sge = init_attr->cap.max_send_sge;
2909 resp.max_recv_sge = init_attr->cap.max_recv_sge;
2910 resp.max_inline_data = init_attr->cap.max_inline_data;
2911 resp.sq_sig_all = init_attr->sq_sig_type == IB_SIGNAL_ALL_WR;
2914 &resp, sizeof resp))