Lines Matching full:req
48 struct ctl_req req; in init_ctl_port() local
62 memset(&req, 0, sizeof(req)); in init_ctl_port()
63 strlcpy(req.driver, "nvmf", sizeof(req.driver)); in init_ctl_port()
64 req.reqtype = CTL_REQ_CREATE; in init_ctl_port()
65 req.args = nvlist_pack(nvl, &req.args_len); in init_ctl_port()
66 if (req.args == NULL) in init_ctl_port()
68 req.result = result_buf; in init_ctl_port()
69 req.result_len = sizeof(result_buf); in init_ctl_port()
70 if (ioctl(ctl_fd, CTL_PORT_REQ, &req) != 0) in init_ctl_port()
72 if (req.status == CTL_LUN_ERROR) in init_ctl_port()
73 errx(1, "Failed to create CTL port: %s", req.error_str); in init_ctl_port()
74 if (req.status != CTL_LUN_OK) in init_ctl_port()
75 errx(1, "Failed to create CTL port: %d", req.status); in init_ctl_port()
78 nvl = nvlist_unpack(result_buf, req.result_len, 0); in init_ctl_port()
94 struct ctl_req req; in shutdown_ctl_port() local
103 memset(&req, 0, sizeof(req)); in shutdown_ctl_port()
104 strlcpy(req.driver, "nvmf", sizeof(req.driver)); in shutdown_ctl_port()
105 req.reqtype = CTL_REQ_REMOVE; in shutdown_ctl_port()
106 req.args = nvlist_pack(nvl, &req.args_len); in shutdown_ctl_port()
107 if (req.args == NULL) in shutdown_ctl_port()
109 if (ioctl(ctl_fd, CTL_PORT_REQ, &req) != 0) in shutdown_ctl_port()
111 if (req.status == CTL_LUN_ERROR) in shutdown_ctl_port()
112 errx(1, "Failed to remove CTL port: %s", req.error_str); in shutdown_ctl_port()
113 if (req.status != CTL_LUN_OK) in shutdown_ctl_port()
114 errx(1, "Failed to remove CTL port: %d", req.status); in shutdown_ctl_port()
124 struct ctl_nvmf req; in ctl_handoff_qpair() local
127 memset(&req, 0, sizeof(req)); in ctl_handoff_qpair()
128 req.type = CTL_NVMF_HANDOFF; in ctl_handoff_qpair()
129 error = nvmf_handoff_controller_qpair(qp, cmd, data, &req.data.handoff); in ctl_handoff_qpair()
135 if (ioctl(ctl_fd, CTL_NVMF, &req) != 0) in ctl_handoff_qpair()