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()
672 struct ib_ucm_notify cmd; in ib_ucm_notify() local
676 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_notify()
679 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_notify()
683 result = ib_cm_notify(ctx->cm_id, (enum ib_event_type) cmd.event); in ib_ucm_notify()
737 struct ib_ucm_req cmd; in ib_ucm_send_req() local
744 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_send_req()
747 result = ib_ucm_alloc_data(¶m.private_data, cmd.data, cmd.len); in ib_ucm_send_req()
751 result = ib_ucm_path_get(¶m.primary_path, cmd.primary_path); in ib_ucm_send_req()
755 result = ib_ucm_path_get(¶m.alternate_path, cmd.alternate_path); in ib_ucm_send_req()
759 param.private_data_len = cmd.len; in ib_ucm_send_req()
760 param.service_id = cmd.sid; in ib_ucm_send_req()
761 param.qp_num = cmd.qpn; in ib_ucm_send_req()
762 param.qp_type = cmd.qp_type; in ib_ucm_send_req()
763 param.starting_psn = cmd.psn; in ib_ucm_send_req()
764 param.peer_to_peer = cmd.peer_to_peer; in ib_ucm_send_req()
765 param.responder_resources = cmd.responder_resources; in ib_ucm_send_req()
766 param.initiator_depth = cmd.initiator_depth; in ib_ucm_send_req()
767 param.remote_cm_response_timeout = cmd.remote_cm_response_timeout; in ib_ucm_send_req()
768 param.flow_control = cmd.flow_control; in ib_ucm_send_req()
769 param.local_cm_response_timeout = cmd.local_cm_response_timeout; in ib_ucm_send_req()
770 param.retry_count = cmd.retry_count; in ib_ucm_send_req()
771 param.rnr_retry_count = cmd.rnr_retry_count; in ib_ucm_send_req()
772 param.max_cm_retries = cmd.max_cm_retries; in ib_ucm_send_req()
773 param.srq = cmd.srq; in ib_ucm_send_req()
775 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_send_req()
795 struct ib_ucm_rep cmd; in ib_ucm_send_rep() local
800 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_send_rep()
803 result = ib_ucm_alloc_data(¶m.private_data, cmd.data, cmd.len); in ib_ucm_send_rep()
807 param.qp_num = cmd.qpn; in ib_ucm_send_rep()
808 param.starting_psn = cmd.psn; in ib_ucm_send_rep()
809 param.private_data_len = cmd.len; in ib_ucm_send_rep()
810 param.responder_resources = cmd.responder_resources; in ib_ucm_send_rep()
811 param.initiator_depth = cmd.initiator_depth; in ib_ucm_send_rep()
812 param.failover_accepted = cmd.failover_accepted; in ib_ucm_send_rep()
813 param.flow_control = cmd.flow_control; in ib_ucm_send_rep()
814 param.rnr_retry_count = cmd.rnr_retry_count; in ib_ucm_send_rep()
815 param.srq = cmd.srq; in ib_ucm_send_rep()
817 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_send_rep()
819 ctx->uid = cmd.uid; in ib_ucm_send_rep()
835 struct ib_ucm_private_data cmd; in ib_ucm_send_private_data() local
840 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_send_private_data()
843 result = ib_ucm_alloc_data(&private_data, cmd.data, cmd.len); in ib_ucm_send_private_data()
847 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_send_private_data()
849 result = func(ctx->cm_id, private_data, cmd.len); in ib_ucm_send_private_data()
889 struct ib_ucm_info cmd; in ib_ucm_send_info() local
894 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_send_info()
897 result = ib_ucm_alloc_data(&data, cmd.data, cmd.data_len); in ib_ucm_send_info()
901 result = ib_ucm_alloc_data(&info, cmd.info, cmd.info_len); in ib_ucm_send_info()
905 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_send_info()
907 result = func(ctx->cm_id, cmd.status, info, cmd.info_len, in ib_ucm_send_info()
908 data, cmd.data_len); in ib_ucm_send_info()
938 struct ib_ucm_mra cmd; in ib_ucm_send_mra() local
942 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_send_mra()
945 result = ib_ucm_alloc_data(&data, cmd.data, cmd.len); in ib_ucm_send_mra()
949 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_send_mra()
951 result = ib_send_cm_mra(ctx->cm_id, cmd.timeout, data, cmd.len); in ib_ucm_send_mra()
966 struct ib_ucm_lap cmd; in ib_ucm_send_lap() local
970 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_send_lap()
973 result = ib_ucm_alloc_data(&data, cmd.data, cmd.len); in ib_ucm_send_lap()
977 result = ib_ucm_path_get(&path, cmd.path); in ib_ucm_send_lap()
981 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_send_lap()
983 result = ib_send_cm_lap(ctx->cm_id, path, data, cmd.len); in ib_ucm_send_lap()
1000 struct ib_ucm_sidr_req cmd; in ib_ucm_send_sidr_req() local
1006 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_send_sidr_req()
1009 result = ib_ucm_alloc_data(¶m.private_data, cmd.data, cmd.len); in ib_ucm_send_sidr_req()
1013 result = ib_ucm_path_get(¶m.path, cmd.path); in ib_ucm_send_sidr_req()
1017 param.private_data_len = cmd.len; in ib_ucm_send_sidr_req()
1018 param.service_id = cmd.sid; in ib_ucm_send_sidr_req()
1019 param.timeout_ms = cmd.timeout; in ib_ucm_send_sidr_req()
1020 param.max_cm_retries = cmd.max_cm_retries; in ib_ucm_send_sidr_req()
1022 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_send_sidr_req()
1040 struct ib_ucm_sidr_rep cmd; in ib_ucm_send_sidr_rep() local
1046 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_send_sidr_rep()
1050 cmd.data, cmd.data_len); in ib_ucm_send_sidr_rep()
1054 result = ib_ucm_alloc_data(¶m.info, cmd.info, cmd.info_len); in ib_ucm_send_sidr_rep()
1058 param.qp_num = cmd.qpn; in ib_ucm_send_sidr_rep()
1059 param.qkey = cmd.qkey; in ib_ucm_send_sidr_rep()
1060 param.status = cmd.status; in ib_ucm_send_sidr_rep()
1061 param.info_length = cmd.info_len; in ib_ucm_send_sidr_rep()
1062 param.private_data_len = cmd.data_len; in ib_ucm_send_sidr_rep()
1064 ctx = ib_ucm_ctx_get(file, cmd.id); in ib_ucm_send_sidr_rep()
1116 if (hdr.cmd >= ARRAY_SIZE(ucm_cmd_table)) in ib_ucm_write()
1122 result = ucm_cmd_table[hdr.cmd](file, buf + sizeof(hdr), in ib_ucm_write()