Lines Matching defs:qid
29 int qid;
59 static int nvme_auth_submit(struct nvme_ctrl *ctrl, int qid,
67 if (qid != 0) {
85 qid == 0 ? NVME_QID_ANY : qid, flags);
88 "qid %d auth_send failed with status %d\n", qid, ret);
91 "qid %d auth_send failed with error %d\n", qid, ret);
95 static int nvme_auth_receive_validate(struct nvme_ctrl *ctrl, int qid,
99 dev_dbg(ctrl->device, "%s: qid %d auth_type %d auth_id %x\n",
100 __func__, qid, data->auth_type, data->auth_id);
109 "qid %d invalid message %02x/%02x\n",
110 qid, data->auth_type, data->auth_id);
115 "qid %d invalid transaction ID %d\n",
116 qid, le16_to_cpu(data->t_id));
136 if (ctrl->opts->concat && chap->qid == 0) {
177 "qid %d: invalid HASH ID %d\n",
178 chap->qid, data->hashid);
187 "qid %d: reuse existing hash %s\n",
188 chap->qid, hmac_name);
202 "qid %d: failed to allocate hash %s, error %ld\n",
203 chap->qid, hmac_name, PTR_ERR(chap->shash_tfm));
211 "qid %d: invalid hash length %d\n",
212 chap->qid, data->hl);
221 dev_dbg(ctrl->device, "qid %d: selected hash %s\n",
222 chap->qid, hmac_name);
228 "qid %d: invalid DH group id %d\n",
229 chap->qid, data->dhgid);
238 "qid %d: reuse existing DH group %s\n",
239 chap->qid, gid_name);
252 "qid %d: empty DH value\n",
253 chap->qid);
263 "qid %d: error %d initializing DH group %s\n",
264 chap->qid, ret, gid_name);
269 dev_dbg(ctrl->device, "qid %d: selected DH group %s\n",
270 chap->qid, gid_name);
273 "qid %d: invalid DH value for NULL DH\n",
274 chap->qid);
329 dev_dbg(ctrl->device, "%s: qid %d ctrl challenge %*ph\n",
330 __func__, chap->qid, (int)chap->hash_len, chap->c2);
340 dev_dbg(ctrl->device, "%s: qid %d host public key %*ph\n",
341 __func__, chap->qid,
363 "qid %d: invalid hash length %u\n",
364 chap->qid, data->hl);
370 if (chap->qid == 0)
372 "qid 0: authenticated with hash %s dhgroup %s\n",
381 dev_dbg(ctrl->device, "%s: qid %d ctrl response %*ph\n",
382 __func__, chap->qid, (int)chap->hash_len, data->rval);
383 dev_dbg(ctrl->device, "%s: qid %d host response %*ph\n",
384 __func__, chap->qid, (int)chap->hash_len,
387 "qid %d: controller authentication failed\n",
388 chap->qid);
394 if (chap->qid == 0)
396 "qid 0: controller authenticated\n");
437 dev_dbg(ctrl->device, "%s: qid %d host response seq %u transaction %d\n",
438 __func__, chap->qid, chap->s1, chap->transaction);
449 dev_dbg(ctrl->device, "%s: qid %d re-using host response\n",
450 __func__, chap->qid);
456 dev_warn(ctrl->device, "qid %d: failed to set key, error %d\n",
457 chap->qid, ret);
534 dev_warn(ctrl->device, "qid %d: failed to set key, error %d\n",
535 chap->qid, ret);
553 dev_dbg(ctrl->device, "%s: qid %d ctrl response seq %u transaction %d\n",
554 __func__, chap->qid, chap->s2, chap->transaction);
555 dev_dbg(ctrl->device, "%s: qid %d challenge %*ph\n",
556 __func__, chap->qid, (int)chap->hash_len, challenge);
557 dev_dbg(ctrl->device, "%s: qid %d subsysnqn %s\n",
558 __func__, chap->qid, ctrl->opts->subsysnqn);
559 dev_dbg(ctrl->device, "%s: qid %d hostnqn %s\n",
560 __func__, chap->qid, ctrl->opts->host->nqn);
609 "qid %d: reusing host key\n", chap->qid);
713 "%s: qid %d no session key negotiated\n",
714 __func__, chap->qid);
718 if (chap->qid) {
720 "qid %d: secure concatenation not supported on I/O queues\n",
721 chap->qid);
730 "%s: qid %d failed to generate PSK, error %d\n",
731 __func__, chap->qid, ret);
742 "%s: qid %d failed to generate digest, error %d\n",
743 __func__, chap->qid, ret);
752 "%s: qid %d failed to derive TLS psk, error %d\n",
753 __func__, chap->qid, ret);
764 "%s: qid %d failed to insert generated key, error %d\n",
765 __func__, chap->qid, ret);
800 dev_dbg(ctrl->device, "%s: qid %d send negotiate\n",
801 __func__, chap->qid);
808 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, tl, true);
815 dev_dbg(ctrl->device, "%s: qid %d receive challenge\n",
816 __func__, chap->qid);
819 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, CHAP_BUF_SIZE,
823 "qid %d failed to receive challenge, %s %d\n",
824 chap->qid, ret < 0 ? "error" : "nvme status", ret);
828 ret = nvme_auth_receive_validate(ctrl, chap->qid, chap->buf, chap->transaction,
845 "%s: qid %d DH exponential\n",
846 __func__, chap->qid);
854 dev_dbg(ctrl->device, "%s: qid %d host response\n",
855 __func__, chap->qid);
865 dev_dbg(ctrl->device, "%s: qid %d send reply\n",
866 __func__, chap->qid);
874 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, tl, true);
881 dev_dbg(ctrl->device, "%s: qid %d receive success1\n",
882 __func__, chap->qid);
885 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, CHAP_BUF_SIZE,
889 "qid %d failed to receive success1, %s %d\n",
890 chap->qid, ret < 0 ? "error" : "nvme status", ret);
894 ret = nvme_auth_receive_validate(ctrl, chap->qid,
906 "%s: qid %d controller response\n",
907 __func__, chap->qid);
926 dev_dbg(ctrl->device, "%s: qid %d send success2\n",
927 __func__, chap->qid);
929 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, tl, true);
939 "%s: qid %d failed to enable secure concatenation\n",
940 __func__, chap->qid);
950 dev_dbg(ctrl->device, "%s: qid %d send failure2, status %x\n",
951 __func__, chap->qid, chap->status);
953 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, tl, true);
962 int nvme_auth_negotiate(struct nvme_ctrl *ctrl, int qid)
967 dev_warn(ctrl->device, "qid %d: no key\n", qid);
972 dev_warn(ctrl->device, "qid %d: invalid ctrl key\n", qid);
976 chap = &ctrl->dhchap_ctxs[qid];
983 int nvme_auth_wait(struct nvme_ctrl *ctrl, int qid)
988 chap = &ctrl->dhchap_ctxs[qid];
1014 "qid 0: error %d setting up authentication\n", ret);
1020 "qid 0: authentication failed\n");
1056 "qid %d: authentication failed\n", q);
1090 chap->qid = i;