Lines Matching refs:cmd
390 struct ib_ucm_event_get cmd; in ib_ucm_event() local
397 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_event()
428 if (copy_to_user((void __user *)(unsigned long)cmd.response, in ib_ucm_event()
435 if (cmd.data_len < uevent->data_len) { in ib_ucm_event()
439 if (copy_to_user((void __user *)(unsigned long)cmd.data, in ib_ucm_event()
447 if (cmd.info_len < uevent->info_len) { in ib_ucm_event()
451 if (copy_to_user((void __user *)(unsigned long)cmd.info, in ib_ucm_event()
474 struct ib_ucm_create_id cmd; in ib_ucm_create_id() local
482 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_create_id()
491 ctx->uid = cmd.uid; in ib_ucm_create_id()
500 if (copy_to_user((void __user *)(unsigned long)cmd.response, in ib_ucm_create_id()
521 struct ib_ucm_destroy_id cmd; in ib_ucm_destroy_id() local
529 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_destroy_id()
533 ctx = idr_find(&ctx_id_table, cmd.id); in ib_ucm_destroy_id()
554 if (copy_to_user((void __user *)(unsigned long)cmd.response, in ib_ucm_destroy_id()
567 struct ib_ucm_attr_id cmd; in ib_ucm_attr_id() local
574 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_attr_id()
577 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_attr_id()
586 if (copy_to_user((void __user *)(unsigned long)cmd.response, in ib_ucm_attr_id()
599 struct ib_ucm_init_qp_attr cmd; in ib_ucm_init_qp_attr() local
607 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_init_qp_attr()
610 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_init_qp_attr()
616 qp_attr.qp_state = cmd.qp_state; in ib_ucm_init_qp_attr()
623 if (copy_to_user((void __user *)(unsigned long)cmd.response, in ib_ucm_init_qp_attr()
647 struct ib_ucm_listen cmd; in ib_ucm_listen() local
651 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_listen()
654 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_listen()
658 result = ucm_validate_listen(cmd.service_id, cmd.service_mask); in ib_ucm_listen()
662 result = ib_cm_listen(ctx->cm_id, cmd.service_id, cmd.service_mask, in ib_ucm_listen()
673 struct ib_ucm_notify cmd; in ib_ucm_notify() local
677 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_notify()
680 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_notify()
684 result = ib_cm_notify(ctx->cm_id, (enum ib_event_type) cmd.event); in ib_ucm_notify()
738 struct ib_ucm_req cmd; in ib_ucm_send_req() local
745 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_send_req()
748 result = ib_ucm_alloc_data(¶m.private_data, cmd.data, cmd.len); in ib_ucm_send_req()
752 result = ib_ucm_path_get(¶m.primary_path, cmd.primary_path); in ib_ucm_send_req()
756 result = ib_ucm_path_get(¶m.alternate_path, cmd.alternate_path); in ib_ucm_send_req()
760 param.private_data_len = cmd.len; in ib_ucm_send_req()
761 param.service_id = cmd.sid; in ib_ucm_send_req()
762 param.qp_num = cmd.qpn; in ib_ucm_send_req()
763 param.qp_type = cmd.qp_type; in ib_ucm_send_req()
764 param.starting_psn = cmd.psn; in ib_ucm_send_req()
765 param.peer_to_peer = cmd.peer_to_peer; in ib_ucm_send_req()
766 param.responder_resources = cmd.responder_resources; in ib_ucm_send_req()
767 param.initiator_depth = cmd.initiator_depth; in ib_ucm_send_req()
768 param.remote_cm_response_timeout = cmd.remote_cm_response_timeout; in ib_ucm_send_req()
769 param.flow_control = cmd.flow_control; in ib_ucm_send_req()
770 param.local_cm_response_timeout = cmd.local_cm_response_timeout; in ib_ucm_send_req()
771 param.retry_count = cmd.retry_count; in ib_ucm_send_req()
772 param.rnr_retry_count = cmd.rnr_retry_count; in ib_ucm_send_req()
773 param.max_cm_retries = cmd.max_cm_retries; in ib_ucm_send_req()
774 param.srq = cmd.srq; in ib_ucm_send_req()
776 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_send_req()
796 struct ib_ucm_rep cmd; in ib_ucm_send_rep() local
801 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_send_rep()
804 result = ib_ucm_alloc_data(¶m.private_data, cmd.data, cmd.len); in ib_ucm_send_rep()
808 param.qp_num = cmd.qpn; in ib_ucm_send_rep()
809 param.starting_psn = cmd.psn; in ib_ucm_send_rep()
810 param.private_data_len = cmd.len; in ib_ucm_send_rep()
811 param.responder_resources = cmd.responder_resources; in ib_ucm_send_rep()
812 param.initiator_depth = cmd.initiator_depth; in ib_ucm_send_rep()
813 param.failover_accepted = cmd.failover_accepted; in ib_ucm_send_rep()
814 param.flow_control = cmd.flow_control; in ib_ucm_send_rep()
815 param.rnr_retry_count = cmd.rnr_retry_count; in ib_ucm_send_rep()
816 param.srq = cmd.srq; in ib_ucm_send_rep()
818 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_send_rep()
820 ctx->uid = cmd.uid; in ib_ucm_send_rep()
836 struct ib_ucm_private_data cmd; in ib_ucm_send_private_data() local
841 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_send_private_data()
844 result = ib_ucm_alloc_data(&private_data, cmd.data, cmd.len); in ib_ucm_send_private_data()
848 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_send_private_data()
850 result = func(ctx->cm_id, private_data, cmd.len); in ib_ucm_send_private_data()
890 struct ib_ucm_info cmd; in ib_ucm_send_info() local
895 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_send_info()
898 result = ib_ucm_alloc_data(&data, cmd.data, cmd.data_len); in ib_ucm_send_info()
902 result = ib_ucm_alloc_data(&info, cmd.info, cmd.info_len); in ib_ucm_send_info()
906 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_send_info()
908 result = func(ctx->cm_id, cmd.status, info, cmd.info_len, in ib_ucm_send_info()
909 data, cmd.data_len); in ib_ucm_send_info()
939 struct ib_ucm_mra cmd; in ib_ucm_send_mra() local
943 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_send_mra()
946 result = ib_ucm_alloc_data(&data, cmd.data, cmd.len); in ib_ucm_send_mra()
950 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_send_mra()
952 result = ib_send_cm_mra(ctx->cm_id, cmd.timeout, data, cmd.len); in ib_ucm_send_mra()
967 struct ib_ucm_lap cmd; in ib_ucm_send_lap() local
971 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_send_lap()
974 result = ib_ucm_alloc_data(&data, cmd.data, cmd.len); in ib_ucm_send_lap()
978 result = ib_ucm_path_get(&path, cmd.path); in ib_ucm_send_lap()
982 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_send_lap()
984 result = ib_send_cm_lap(ctx->cm_id, path, data, cmd.len); in ib_ucm_send_lap()
1001 struct ib_ucm_sidr_req cmd; in ib_ucm_send_sidr_req() local
1007 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_send_sidr_req()
1010 result = ib_ucm_alloc_data(¶m.private_data, cmd.data, cmd.len); in ib_ucm_send_sidr_req()
1014 result = ib_ucm_path_get(¶m.path, cmd.path); in ib_ucm_send_sidr_req()
1018 param.private_data_len = cmd.len; in ib_ucm_send_sidr_req()
1019 param.service_id = cmd.sid; in ib_ucm_send_sidr_req()
1020 param.timeout_ms = cmd.timeout; in ib_ucm_send_sidr_req()
1021 param.max_cm_retries = cmd.max_cm_retries; in ib_ucm_send_sidr_req()
1023 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_send_sidr_req()
1041 struct ib_ucm_sidr_rep cmd; in ib_ucm_send_sidr_rep() local
1047 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_send_sidr_rep()
1051 cmd.data, cmd.data_len); in ib_ucm_send_sidr_rep()
1055 result = ib_ucm_alloc_data(¶m.info, cmd.info, cmd.info_len); in ib_ucm_send_sidr_rep()
1059 param.qp_num = cmd.qpn; in ib_ucm_send_sidr_rep()
1060 param.qkey = cmd.qkey; in ib_ucm_send_sidr_rep()
1061 param.status = cmd.status; in ib_ucm_send_sidr_rep()
1062 param.info_length = cmd.info_len; in ib_ucm_send_sidr_rep()
1063 param.private_data_len = cmd.data_len; in ib_ucm_send_sidr_rep()
1065 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_send_sidr_rep()
1117 if (hdr.cmd >= ARRAY_SIZE(ucm_cmd_table)) in ib_ucm_write()
1123 result = ucm_cmd_table[hdr.cmd](file, buf + sizeof(hdr), in ib_ucm_write()