Lines Matching defs:msg

29 #define AUTH_LOGDUMP(msg, buf, len) \
30 SPDK_LOGDUMP(nvmf_auth, msg, buf, len)
223 nvmf_auth_negotiate_exec(struct spdk_nvmf_request *req, struct spdk_nvmf_auth_negotiate *msg)
253 auth->tid = msg->t_id;
254 if (req->length < sizeof(*msg) || req->length != sizeof(*msg) + msg->napd * sizeof(*desc)) {
260 if (msg->sc_c != SPDK_NVMF_AUTH_SCC_DISABLED) {
266 for (i = 0; i < msg->napd; ++i) {
267 if (msg->descriptors[i].auth_id == SPDK_NVMF_AUTH_TYPE_DHCHAP) {
268 desc = &msg->descriptors[i];
342 nvmf_auth_reply_exec(struct spdk_nvmf_request *req, struct spdk_nvmf_dhchap_reply *msg)
359 if (req->length < sizeof(*msg)) {
366 if (hl == 0 || msg->hl != hl) {
367 AUTH_ERRLOG(qpair, "hash length mismatch: %u != %u\n", msg->hl, hl);
371 if ((msg->dhvlen % 4) != 0) {
372 AUTH_ERRLOG(qpair, "dhvlen=%u is not multiple of 4\n", msg->dhvlen);
376 if (req->length != sizeof(*msg) + 2 * hl + msg->dhvlen) {
378 req->length, sizeof(*msg) + 2 * hl);
382 if (msg->t_id != auth->tid) {
383 AUTH_ERRLOG(qpair, "transaction id mismatch: %u != %u\n", msg->t_id, auth->tid);
387 if (msg->cvalid != 0 && msg->cvalid != 1) {
388 AUTH_ERRLOG(qpair, "unexpected cvalid=%d\n", msg->cvalid);
392 if (msg->cvalid && msg->seqnum == 0) {
406 AUTH_LOGDUMP("host pubkey:", &msg->rval[2 * hl], msg->dhvlen);
408 rc = spdk_nvme_dhchap_dhkey_derive_secret(auth->dhkey, &msg->rval[2 * hl],
409 msg->dhvlen, dhsec, &dhseclen);
432 if (memcmp(msg->rval, response, hl) != 0) {
434 AUTH_LOGDUMP("response:", msg->rval, hl);
440 if (msg->cvalid) {
449 "Controller", msg->seqnum, auth->tid, 0,
452 &msg->rval[hl], auth->cval);
477 nvmf_auth_success2_exec(struct spdk_nvmf_request *req, struct spdk_nvmf_dhchap_success2 *msg)
487 if (req->length != sizeof(*msg)) {
492 if (msg->t_id != auth->tid) {
493 AUTH_ERRLOG(qpair, "transaction id mismatch: %u != %u\n", msg->t_id, auth->tid);
506 nvmf_auth_failure2_exec(struct spdk_nvmf_request *req, struct spdk_nvmf_auth_failure *msg)
517 if (req->length != sizeof(*msg)) {
522 if (msg->t_id != auth->tid) {
523 AUTH_ERRLOG(qpair, "transaction id mismatch: %u != %u\n", msg->t_id, auth->tid);
528 AUTH_ERRLOG(qpair, "ctrlr authentication failed: rc=%d, rce=%d\n", msg->rc, msg->rce);