Lines Matching refs:qid
27 int qid; member
50 #define nvme_auth_flags_from_qid(qid) \ argument
51 (qid == 0) ? 0 : BLK_MQ_REQ_NOWAIT | BLK_MQ_REQ_RESERVED
52 #define nvme_auth_queue_from_qid(ctrl, qid) \ argument
53 (qid == 0) ? (ctrl)->fabrics_q : (ctrl)->connect_q
61 static int nvme_auth_submit(struct nvme_ctrl *ctrl, int qid, in nvme_auth_submit() argument
65 blk_mq_req_flags_t flags = nvme_auth_flags_from_qid(qid); in nvme_auth_submit()
66 struct request_queue *q = nvme_auth_queue_from_qid(ctrl, qid); in nvme_auth_submit()
82 qid == 0 ? NVME_QID_ANY : qid, in nvme_auth_submit()
86 "qid %d auth_send failed with status %d\n", qid, ret); in nvme_auth_submit()
89 "qid %d auth_send failed with error %d\n", qid, ret); in nvme_auth_submit()
93 static int nvme_auth_receive_validate(struct nvme_ctrl *ctrl, int qid, in nvme_auth_receive_validate() argument
98 __func__, qid, data->auth_type, data->auth_id); in nvme_auth_receive_validate()
108 qid, data->auth_type, data->auth_id); in nvme_auth_receive_validate()
114 qid, le16_to_cpu(data->t_id)); in nvme_auth_receive_validate()
170 chap->qid, data->hashid); in nvme_auth_process_dhchap_challenge()
180 chap->qid, hmac_name); in nvme_auth_process_dhchap_challenge()
195 chap->qid, hmac_name, PTR_ERR(chap->shash_tfm)); in nvme_auth_process_dhchap_challenge()
204 chap->qid, data->hl); in nvme_auth_process_dhchap_challenge()
214 chap->qid, hmac_name); in nvme_auth_process_dhchap_challenge()
221 chap->qid, data->dhgid); in nvme_auth_process_dhchap_challenge()
231 chap->qid, gid_name); in nvme_auth_process_dhchap_challenge()
245 chap->qid); in nvme_auth_process_dhchap_challenge()
256 chap->qid, ret, gid_name); in nvme_auth_process_dhchap_challenge()
262 chap->qid, gid_name); in nvme_auth_process_dhchap_challenge()
266 chap->qid); in nvme_auth_process_dhchap_challenge()
321 __func__, chap->qid, (int)chap->hash_len, chap->c2); in nvme_auth_set_dhchap_reply_data()
329 __func__, chap->qid, in nvme_auth_set_dhchap_reply_data()
355 chap->qid, data->hl); in nvme_auth_process_dhchap_success1()
361 if (chap->qid == 0) in nvme_auth_process_dhchap_success1()
373 __func__, chap->qid, (int)chap->hash_len, data->rval); in nvme_auth_process_dhchap_success1()
375 __func__, chap->qid, (int)chap->hash_len, in nvme_auth_process_dhchap_success1()
379 chap->qid); in nvme_auth_process_dhchap_success1()
385 if (chap->qid == 0) in nvme_auth_process_dhchap_success1()
429 __func__, chap->qid, chap->s1, chap->transaction); in nvme_auth_dhchap_setup_host_response()
441 __func__, chap->qid); in nvme_auth_dhchap_setup_host_response()
448 chap->qid, ret); in nvme_auth_dhchap_setup_host_response()
526 chap->qid, ret); in nvme_auth_dhchap_setup_ctrl_response()
545 __func__, chap->qid, chap->s2, chap->transaction); in nvme_auth_dhchap_setup_ctrl_response()
547 __func__, chap->qid, (int)chap->hash_len, challenge); in nvme_auth_dhchap_setup_ctrl_response()
549 __func__, chap->qid, ctrl->opts->subsysnqn); in nvme_auth_dhchap_setup_ctrl_response()
551 __func__, chap->qid, ctrl->opts->host->nqn); in nvme_auth_dhchap_setup_ctrl_response()
600 "qid %d: reusing host key\n", chap->qid); in nvme_auth_dhchap_exponential()
704 __func__, chap->qid); in nvme_queue_auth_work()
711 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, tl, true); in nvme_queue_auth_work()
719 __func__, chap->qid); in nvme_queue_auth_work()
722 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, CHAP_BUF_SIZE, in nvme_queue_auth_work()
727 chap->qid, ret < 0 ? "error" : "nvme status", ret); in nvme_queue_auth_work()
731 ret = nvme_auth_receive_validate(ctrl, chap->qid, chap->buf, chap->transaction, in nvme_queue_auth_work()
749 __func__, chap->qid); in nvme_queue_auth_work()
758 __func__, chap->qid); in nvme_queue_auth_work()
770 __func__, chap->qid); in nvme_queue_auth_work()
778 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, tl, true); in nvme_queue_auth_work()
786 __func__, chap->qid); in nvme_queue_auth_work()
789 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, CHAP_BUF_SIZE, in nvme_queue_auth_work()
794 chap->qid, ret < 0 ? "error" : "nvme status", ret); in nvme_queue_auth_work()
798 ret = nvme_auth_receive_validate(ctrl, chap->qid, in nvme_queue_auth_work()
811 __func__, chap->qid); in nvme_queue_auth_work()
831 __func__, chap->qid); in nvme_queue_auth_work()
833 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, tl, true); in nvme_queue_auth_work()
844 __func__, chap->qid, chap->status); in nvme_queue_auth_work()
846 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, tl, true); in nvme_queue_auth_work()
855 int nvme_auth_negotiate(struct nvme_ctrl *ctrl, int qid) in nvme_auth_negotiate() argument
860 dev_warn(ctrl->device, "qid %d: no key\n", qid); in nvme_auth_negotiate()
865 dev_warn(ctrl->device, "qid %d: invalid ctrl key\n", qid); in nvme_auth_negotiate()
869 chap = &ctrl->dhchap_ctxs[qid]; in nvme_auth_negotiate()
876 int nvme_auth_wait(struct nvme_ctrl *ctrl, int qid) in nvme_auth_wait() argument
881 chap = &ctrl->dhchap_ctxs[qid]; in nvme_auth_wait()
969 chap->qid = i; in nvme_auth_init_ctrl()