Loading lib/nvmf/conn.c +0 −3 Original line number Diff line number Diff line Loading @@ -123,8 +123,6 @@ int spdk_initialize_nvmf_conns(int max_connections) size_t conns_size; int i, rc; SPDK_TRACELOG(SPDK_TRACE_DEBUG, "Enter\n"); rc = pthread_mutex_init(&g_conns_mutex, NULL); if (rc != 0) { SPDK_ERRLOG("mutex_init() failed\n"); Loading Loading @@ -469,4 +467,3 @@ nvmf_allocate_reactor(uint64_t cpumask) return selected_core; } lib/nvmf/rdma.c +15 −21 Original line number Diff line number Diff line Loading @@ -212,9 +212,8 @@ nvmf_rdma_conn_cleanup(struct spdk_nvmf_conn *conn) static void nvmf_trace_ibv_sge(struct ibv_sge *sg_list) { SPDK_TRACELOG(SPDK_TRACE_RDMA, "local addr %p\n", (void *)sg_list->addr); SPDK_TRACELOG(SPDK_TRACE_RDMA, "length %x\n", sg_list->length); SPDK_TRACELOG(SPDK_TRACE_RDMA, "lkey %x\n", sg_list->lkey); SPDK_TRACELOG(SPDK_TRACE_RDMA, "local addr %p length 0x%x lkey 0x%x\n", (void *)sg_list->addr, sg_list->length, sg_list->lkey); } static void Loading Loading @@ -244,9 +243,8 @@ nvmf_ibv_send_wr_init(struct ibv_send_wr *wr, wr->wr.rdma.rkey = sgl->keyed.key; wr->wr.rdma.remote_addr = sgl->address; SPDK_TRACELOG(SPDK_TRACE_RDMA, "rkey %x\n", wr->wr.rdma.rkey); SPDK_TRACELOG(SPDK_TRACE_RDMA, "remote addr %p\n", (void *)wr->wr.rdma.remote_addr); SPDK_TRACELOG(SPDK_TRACE_RDMA, "rkey %x remote_addr %p\n", wr->wr.rdma.rkey, (void *)wr->wr.rdma.remote_addr); } nvmf_trace_ibv_sge(wr->sg_list); Loading Loading @@ -333,10 +331,10 @@ nvmf_post_rdma_recv(struct spdk_nvmf_conn *conn, /* for I/O queues we add bb sgl for in-capsule data use */ if (conn->type == CONN_TYPE_IOQ) { wr.num_sge = 2; SPDK_TRACELOG(SPDK_TRACE_DEBUG, "sgl2 local addr %p\n", (void *)rdma_req->bb_sgl.addr); SPDK_TRACELOG(SPDK_TRACE_DEBUG, "sgl2 length %x\n", rdma_req->bb_sgl.length); SPDK_TRACELOG(SPDK_TRACE_DEBUG, "sgl2 lkey %x\n", rdma_req->bb_sgl.lkey); SPDK_TRACELOG(SPDK_TRACE_DEBUG, "sgl2 local addr %p, length 0x%x, lkey 0x%x\n", (void *)rdma_req->bb_sgl.addr, rdma_req->bb_sgl.length, rdma_req->bb_sgl.lkey); } rc = ibv_post_recv(conn->rdma.qp, &wr, &bad_wr); Loading Loading @@ -366,9 +364,6 @@ nvmf_post_rdma_send(struct spdk_nvmf_conn *conn, nvmf_ibv_send_wr_init(&wr, NULL, &rdma_req->send_sgl, (uint64_t)rdma_req, IBV_WR_SEND, IBV_SEND_SIGNALED); SPDK_TRACELOG(SPDK_TRACE_RDMA, "rdma_req %p: req %p, rsp %p\n", rdma_req, req, req->rsp); spdk_trace_record(TRACE_NVMF_IO_COMPLETE, 0, 0, (uint64_t)req, 0); rc = ibv_post_send(conn->rdma.qp, &wr, &bad_wr); if (rc) { Loading Loading @@ -866,7 +861,7 @@ int nvmf_acceptor_start(void) goto listen_error; } sin_port = ntohs(rdma_get_src_port(g_rdma.acceptor_listen_id)); SPDK_NOTICELOG("\n*** NVMf Target Listening on port %d ***\n", sin_port); SPDK_NOTICELOG("*** NVMf Target Listening on port %d ***\n", sin_port); rte_timer_init(&g_rdma.acceptor_timer); rte_timer_reset(&g_rdma.acceptor_timer, ACCEPT_TIMEOUT, PERIODICAL, Loading Loading @@ -901,7 +896,7 @@ nvmf_rdma_init(void) int num_devices_found = 0; int i, ret; SPDK_NOTICELOG("\n*** RDMA Transport Init ***\n"); SPDK_NOTICELOG("*** RDMA Transport Init ***\n"); dev_list = ibv_get_device_list(&num_of_rdma_devices); if (!dev_list) { Loading Loading @@ -998,10 +993,9 @@ nvmf_recv(struct spdk_nvmf_conn *conn, struct ibv_wc *wc) rdma_req = (struct spdk_nvmf_rdma_request *)wc->wr_id; if (wc->byte_len < sizeof(struct spdk_nvmf_capsule_cmd)) { SPDK_ERRLOG("recv length less than capsule header\n"); SPDK_ERRLOG("recv length %u less than capsule header\n", wc->byte_len); return -1; } SPDK_TRACELOG(SPDK_TRACE_NVMF, "recv byte count 0x%x\n", wc->byte_len); req = &rdma_req->req; Loading Loading @@ -1063,7 +1057,7 @@ nvmf_check_rdma_completions(struct spdk_nvmf_conn *conn) switch (wc.opcode) { case IBV_WC_SEND: SPDK_TRACELOG(SPDK_TRACE_RDMA, "\nCQ send completion\n"); SPDK_TRACELOG(SPDK_TRACE_RDMA, "CQ send completion\n"); break; case IBV_WC_RDMA_WRITE: Loading @@ -1071,14 +1065,14 @@ nvmf_check_rdma_completions(struct spdk_nvmf_conn *conn) * Will get this event only if we set IBV_SEND_SIGNALED * flag in rdma_write, to trace rdma write latency */ SPDK_TRACELOG(SPDK_TRACE_RDMA, "\nCQ rdma write completion\n"); SPDK_TRACELOG(SPDK_TRACE_RDMA, "CQ rdma write completion\n"); rdma_req = (struct spdk_nvmf_rdma_request *)wc.wr_id; req = &rdma_req->req; spdk_trace_record(TRACE_RDMA_WRITE_COMPLETE, 0, 0, (uint64_t)req, 0); break; case IBV_WC_RDMA_READ: SPDK_TRACELOG(SPDK_TRACE_RDMA, "\nCQ rdma read completion\n"); SPDK_TRACELOG(SPDK_TRACE_RDMA, "CQ rdma read completion\n"); rdma_req = (struct spdk_nvmf_rdma_request *)wc.wr_id; req = &rdma_req->req; spdk_trace_record(TRACE_RDMA_READ_COMPLETE, 0, 0, (uint64_t)req, 0); Loading @@ -1096,7 +1090,7 @@ nvmf_check_rdma_completions(struct spdk_nvmf_conn *conn) break; case IBV_WC_RECV: SPDK_TRACELOG(SPDK_TRACE_RDMA, "\nCQ recv completion\n"); SPDK_TRACELOG(SPDK_TRACE_RDMA, "CQ recv completion\n"); spdk_trace_record(TRACE_NVMF_IO_START, 0, 0, wc.wr_id, 0); rc = nvmf_recv(conn, &wc); if (rc) { Loading lib/nvmf/request.c +45 −66 Original line number Diff line number Diff line Loading @@ -52,16 +52,14 @@ spdk_nvmf_request_complete(struct spdk_nvmf_request *req) { struct spdk_nvme_cpl *response = &req->rsp->nvme_cpl; SPDK_TRACELOG(SPDK_TRACE_DEBUG, "send nvme cmd capsule response\n"); response->sqid = 0; response->status.p = 0; response->sqhd = req->conn->sq_head; response->cid = req->cmd->nvme_cmd.cid; SPDK_TRACELOG(SPDK_TRACE_NVMF, "cpl: cdw0=0x%x rsvd1=0x%x sqhd=0x%x sqid=0x%x cid=0x%x status=0x%x\n", response->cdw0, response->rsvd1, response->sqhd, response->sqid, response->cid, "cpl: cid=%u cdw0=0x%08x rsvd1=%u sqhd=%u status=0x%04x\n", response->cid, response->cdw0, response->rsvd1, response->sqhd, *(uint16_t *)&response->status); if (spdk_nvmf_rdma_request_complete(req->conn, req)) { Loading @@ -84,16 +82,13 @@ nvmf_process_admin_cmd(struct spdk_nvmf_request *req) int rc = 0; uint8_t feature; SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_process_admin_cmd: req %p\n", req); /* pre-set response details for this command */ response->status.sc = SPDK_NVME_SC_SUCCESS; response->cid = cmd->cid; /* verify subsystem */ if (subsystem == NULL) { SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_process_admin_cmd: Subsystem Not Initialized!\n"); SPDK_TRACELOG(SPDK_TRACE_NVMF, "Subsystem Not Initialized!\n"); response->status.sc = SPDK_NVME_SC_INTERNAL_DEVICE_ERROR; return true; } Loading @@ -110,7 +105,7 @@ nvmf_process_admin_cmd(struct spdk_nvmf_request *req) } else { /* verify namespace id */ if (cmd->nsid > MAX_PER_SUBSYSTEM_NAMESPACES) { SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_process_admin_cmd: Invalid NS_ID %x\n", SPDK_TRACELOG(SPDK_TRACE_NVMF, "Invalid NS_ID %u\n", cmd->nsid); response->status.sc = SPDK_NVME_SC_INVALID_NAMESPACE_OR_FORMAT; return true; Loading @@ -119,7 +114,7 @@ nvmf_process_admin_cmd(struct spdk_nvmf_request *req) ctrlr = subsystem->ns_list_map[cmd->nsid - 1].ctrlr; nsid = subsystem->ns_list_map[cmd->nsid - 1].nvme_ns_id; } SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_process_admin_cmd: ctrlr %p nvme ns_id %d\n", ctrlr, nsid); SPDK_TRACELOG(SPDK_TRACE_NVMF, "ctrlr %p nvme ns_id %u\n", ctrlr, nsid); switch (cmd->opc) { case SPDK_NVME_OPC_IDENTIFY: Loading @@ -135,7 +130,7 @@ nvmf_process_admin_cmd(struct spdk_nvmf_request *req) SPDK_TRACELOG(SPDK_TRACE_NVMF, "Identify Namespace\n"); if (nsid == 0) { SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_process_admin_cmd: Invalid NS_ID = 0\n"); SPDK_TRACELOG(SPDK_TRACE_NVMF, "Invalid NS_ID = 0\n"); response->status.sc = SPDK_NVME_SC_INVALID_NAMESPACE_OR_FORMAT; return true; } Loading Loading @@ -179,7 +174,7 @@ nvmf_process_admin_cmd(struct spdk_nvmf_request *req) feature = cmd->cdw10 & 0xff; /* mask out the FID value */ switch (feature) { case SPDK_NVME_FEAT_NUMBER_OF_QUEUES: SPDK_TRACELOG(SPDK_TRACE_NVMF, "Set Features - Number of Queues, cdw11 %x\n", cmd->cdw11); SPDK_TRACELOG(SPDK_TRACE_NVMF, "Set Features - Number of Queues, cdw11 0x%x\n", cmd->cdw11); /* verify that the contoller is ready to process commands */ if (session->active_queues != 0) { Loading Loading @@ -232,8 +227,7 @@ nvmf_process_admin_cmd(struct spdk_nvmf_request *req) default: passthrough: SPDK_TRACELOG(SPDK_TRACE_NVMF, "RAW Passthrough: Admin Opcode %x for ctrlr %p\n", cmd->opc, ctrlr); SPDK_TRACELOG(SPDK_TRACE_NVMF, "admin_cmd passthrough: opc 0x%02x\n", cmd->opc); cmd->nsid = nsid; rc = spdk_nvme_ctrlr_cmd_admin_raw(ctrlr, cmd, Loading @@ -241,7 +235,7 @@ passthrough: nvmf_complete_cmd, req); if (rc) { SPDK_ERRLOG("nvmf_process_admin_cmd: Error to submit Admin Opcode %x\n", cmd->opc); SPDK_ERRLOG("Error submitting admin opc 0x%02x\n", cmd->opc); response->status.sc = SPDK_NVME_SC_INTERNAL_DEVICE_ERROR; return true; } Loading @@ -267,8 +261,6 @@ nvmf_process_io_cmd(struct spdk_nvmf_request *req) uint32_t io_flags; int rc = 0; SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_process_io_cmd: req %p\n", req); /* pre-set response details for this command */ response = &req->rsp->nvme_cpl; response->status.sc = SPDK_NVME_SC_SUCCESS; Loading @@ -276,21 +268,21 @@ nvmf_process_io_cmd(struct spdk_nvmf_request *req) /* verify subsystem */ if (subsystem == NULL) { SPDK_ERRLOG("nvmf_process_io_cmd: Subsystem Not Initialized!\n"); SPDK_ERRLOG("Subsystem Not Initialized!\n"); response->status.sc = SPDK_NVME_SC_INTERNAL_DEVICE_ERROR; return true; } /* verify that the contoller is ready to process commands */ if (session->vcprop.csts.bits.rdy == 0) { SPDK_ERRLOG("nvmf_process_io_cmd: Subsystem Controller Not Ready!\n"); SPDK_ERRLOG("Subsystem Controller Not Ready!\n"); response->status.sc = SPDK_NVME_SC_NAMESPACE_NOT_READY; return true; } /* verify namespace id */ if (cmd->nsid == 0 || cmd->nsid > MAX_PER_SUBSYSTEM_NAMESPACES) { SPDK_ERRLOG("nvmf_process_io_cmd: Invalid NS_ID %x\n", cmd->nsid); SPDK_ERRLOG("Invalid NS_ID %u\n", cmd->nsid); response->status.sc = SPDK_NVME_SC_INVALID_NAMESPACE_OR_FORMAT; return true; } Loading @@ -312,7 +304,7 @@ nvmf_process_io_cmd(struct spdk_nvmf_request *req) io_flags = cmd->cdw12 & 0xFFFF0000U; if (cmd->opc == SPDK_NVME_OPC_READ) { SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_process_io_cmd: Read; lba address %lx, lba count %x\n", SPDK_TRACELOG(SPDK_TRACE_NVMF, "Read LBA 0x%" PRIx64 ", 0x%x blocks\n", lba_address, lba_count); spdk_trace_record(TRACE_NVMF_LIB_READ_START, 0, 0, (uint64_t)req, 0); rc = spdk_nvme_ns_cmd_read(ns, qpair, Loading @@ -320,7 +312,7 @@ nvmf_process_io_cmd(struct spdk_nvmf_request *req) nvmf_complete_cmd, req, io_flags); } else { SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_process_io_cmd: Write; lba address %lx, lba count %x\n", SPDK_TRACELOG(SPDK_TRACE_NVMF, "Write LBA 0x%" PRIx64 ", 0x%x blocks\n", lba_address, lba_count); spdk_trace_record(TRACE_NVMF_LIB_WRITE_START, 0, 0, (uint64_t)req, 0); rc = spdk_nvme_ns_cmd_write(ns, qpair, Loading @@ -330,7 +322,7 @@ nvmf_process_io_cmd(struct spdk_nvmf_request *req) } break; default: SPDK_TRACELOG(SPDK_TRACE_NVMF, "RAW Passthrough: I/O Opcode %x\n", cmd->opc); SPDK_TRACELOG(SPDK_TRACE_NVMF, "io_cmd passthrough: opc 0x%02x\n", cmd->opc); cmd->nsid = nsid; rc = spdk_nvme_ctrlr_cmd_io_raw(ctrlr, qpair, cmd, Loading @@ -341,7 +333,7 @@ nvmf_process_io_cmd(struct spdk_nvmf_request *req) } if (rc) { SPDK_ERRLOG("nvmf_process_io_cmd: Failed to submit Opcode %x\n", cmd->opc); SPDK_ERRLOG("Failed to submit Opcode 0x%02x\n", cmd->opc); response->status.sc = SPDK_NVME_SC_INTERNAL_DEVICE_ERROR; return true; } Loading Loading @@ -405,15 +397,12 @@ nvmf_process_connect(struct spdk_nvmf_request *req) RTE_VERIFY(connect_data != NULL); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** Connect Capsule *** %p\n", connect); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** cid = %x ***\n", connect->cid); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** recfmt = %x ***\n", connect->recfmt); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** qid = %x ***\n", connect->qid); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** sqsize = %x ***\n", connect->sqsize); SPDK_TRACELOG(SPDK_TRACE_NVMF, "Connect cmd: cid 0x%x recfmt 0x%x qid %u sqsize %u\n", connect->cid, connect->recfmt, connect->qid, connect->sqsize); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** Connect Capsule Data *** %p\n", connect_data); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** cntlid = %x ***\n", connect_data->cntlid); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** hostid = %04x%04x-%04x-%04x-%04x-%04x%04x%04x ***\n", SPDK_TRACELOG(SPDK_TRACE_NVMF, "Connect data:\n"); SPDK_TRACELOG(SPDK_TRACE_NVMF, " cntlid: 0x%04x\n", connect_data->cntlid); SPDK_TRACELOG(SPDK_TRACE_NVMF, " hostid: %04x%04x-%04x-%04x-%04x-%04x%04x%04x\n", htons(*(unsigned short *) &connect_data->hostid[0]), htons(*(unsigned short *) &connect_data->hostid[2]), htons(*(unsigned short *) &connect_data->hostid[4]), Loading @@ -422,8 +411,8 @@ nvmf_process_connect(struct spdk_nvmf_request *req) htons(*(unsigned short *) &connect_data->hostid[10]), htons(*(unsigned short *) &connect_data->hostid[12]), htons(*(unsigned short *) &connect_data->hostid[14])); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** subsiqn = %s ***\n", (char *)&connect_data->subnqn[0]); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** hostiqn = %s ***\n", (char *)&connect_data->hostnqn[0]); SPDK_TRACELOG(SPDK_TRACE_NVMF, " subsiqn: \"%s\"\n", (char *)&connect_data->subnqn[0]); SPDK_TRACELOG(SPDK_TRACE_NVMF, " hostiqn: \"%s\"\n", (char *)&connect_data->hostnqn[0]); response = &req->rsp->connect_rsp; Loading @@ -439,8 +428,7 @@ nvmf_process_connect(struct spdk_nvmf_request *req) } } SPDK_TRACELOG(SPDK_TRACE_NVMF, "send connect capsule response\n"); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** cntlid = %x ***\n", SPDK_TRACELOG(SPDK_TRACE_NVMF, "connect capsule response: cntlid = 0x%04x\n", response->status_code_specific.success.cntlid); return true; } Loading Loading @@ -473,47 +461,41 @@ nvmf_trace_command(union nvmf_h2c_msg *h2c_msg, enum conn_type conn_type) struct spdk_nvmf_capsule_cmd *cap_hdr = &h2c_msg->nvmf_cmd; struct spdk_nvme_cmd *cmd = &h2c_msg->nvme_cmd; struct spdk_nvme_sgl_descriptor *sgl = &cmd->dptr.sgl1; const char *cmd_type; uint8_t opc; SPDK_TRACELOG(SPDK_TRACE_NVMF, "NVMf %s%s Command:\n", conn_type == CONN_TYPE_AQ ? "Admin" : "I/O", cmd->opc == SPDK_NVME_OPC_FABRIC ? " Fabrics" : ""); cmd_type = conn_type == CONN_TYPE_AQ ? "Admin" : "I/O"; if (cmd->opc == SPDK_NVME_OPC_FABRIC) { opc = cap_hdr->fctype; SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: fctype 0x%02x\n", cap_hdr->fctype); SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: cid 0x%x\n", cap_hdr->cid); SPDK_TRACELOG(SPDK_TRACE_NVMF, "%s Fabrics cmd: fctype 0x%02x cid %u\n", cmd_type, cap_hdr->fctype, cap_hdr->cid); } else { opc = cmd->opc; SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: opc 0x%02x\n", cmd->opc); if (cmd->fuse) { SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: fuse %x\n", cmd->fuse); } SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: psdt %u\n", cmd->psdt); SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: cid 0x%x\n", cmd->cid); SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: nsid %u\n", cmd->nsid); SPDK_TRACELOG(SPDK_TRACE_NVMF, "%s cmd: opc 0x%02x fuse %u cid %u nsid %u cdw10 0x%08x\n", cmd_type, cmd->opc, cmd->fuse, cmd->cid, cmd->nsid, cmd->cdw10); if (cmd->mptr) { SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: mptr 0x%" PRIx64 "\n", cmd->mptr); SPDK_TRACELOG(SPDK_TRACE_NVMF, "mptr 0x%" PRIx64 "\n", cmd->mptr); } if (cmd->psdt != SPDK_NVME_PSDT_SGL_MPTR_CONTIG && cmd->psdt != SPDK_NVME_PSDT_SGL_MPTR_SGL) { SPDK_TRACELOG(SPDK_TRACE_NVMF, "psdt %u\n", cmd->psdt); } SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: cdw10 0x%08x\n", cmd->cdw10); } if (spdk_nvme_opc_get_data_transfer(opc) != SPDK_NVME_DATA_NONE) { SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: SGL type 0x%x\n", sgl->generic.type); SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: SGL subtype 0x%x\n", sgl->generic.subtype); if (sgl->generic.type == SPDK_NVME_SGL_TYPE_KEYED_DATA_BLOCK) { SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: SGL address 0x%lx\n", sgl->address); SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: SGL key 0x%x\n", sgl->keyed.key); SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: SGL length 0x%x\n", sgl->keyed.length); SPDK_TRACELOG(SPDK_TRACE_NVMF, "SGL: Keyed%s: addr 0x%" PRIx64 " key 0x%x len 0x%x\n", sgl->generic.subtype == SPDK_NVME_SGL_SUBTYPE_INVALIDATE_KEY ? " (Inv)" : "", sgl->address, sgl->keyed.key, sgl->keyed.length); } else if (sgl->generic.type == SPDK_NVME_SGL_TYPE_DATA_BLOCK) { SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: SGL %s 0x%" PRIx64 "\n", sgl->unkeyed.subtype == SPDK_NVME_SGL_SUBTYPE_OFFSET ? "offset" : "address", sgl->address); SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: SGL length 0x%x\n", sgl->unkeyed.length); SPDK_TRACELOG(SPDK_TRACE_NVMF, "SGL: Data block: %s 0x%" PRIx64 " len 0x%x\n", sgl->unkeyed.subtype == SPDK_NVME_SGL_SUBTYPE_OFFSET ? "offs" : "addr", sgl->address, sgl->unkeyed.length); } else { SPDK_TRACELOG(SPDK_TRACE_NVMF, "SGL type 0x%x subtype 0x%x\n", sgl->generic.type, sgl->generic.subtype); } } } Loading Loading @@ -547,9 +529,6 @@ spdk_nvmf_request_prep_data(struct spdk_nvmf_request *req, if (sgl->generic.type == SPDK_NVME_SGL_TYPE_KEYED_DATA_BLOCK && (sgl->keyed.subtype == SPDK_NVME_SGL_SUBTYPE_ADDRESS || sgl->keyed.subtype == SPDK_NVME_SGL_SUBTYPE_INVALIDATE_KEY)) { SPDK_TRACELOG(SPDK_TRACE_NVMF, "Keyed data block: raddr 0x%" PRIx64 ", rkey 0x%x, length 0x%x\n", sgl->address, sgl->keyed.key, sgl->keyed.length); if (sgl->keyed.length > bb_len) { SPDK_ERRLOG("SGL length 0x%x exceeds BB length 0x%x\n", sgl->keyed.length, bb_len); Loading lib/nvmf/session.c +0 −1 Original line number Diff line number Diff line Loading @@ -333,7 +333,6 @@ nvmf_complete_cmd(void *ctx, const struct spdk_nvme_cpl *cmp) struct spdk_nvme_cpl *response; spdk_trace_record(TRACE_NVMF_LIB_COMPLETE, 0, 0, (uint64_t)req, 0); SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_complete_cmd callback: req %p\n", req); response = &req->rsp->nvme_cpl; memcpy(response, cmp, sizeof(*cmp)); Loading Loading
lib/nvmf/conn.c +0 −3 Original line number Diff line number Diff line Loading @@ -123,8 +123,6 @@ int spdk_initialize_nvmf_conns(int max_connections) size_t conns_size; int i, rc; SPDK_TRACELOG(SPDK_TRACE_DEBUG, "Enter\n"); rc = pthread_mutex_init(&g_conns_mutex, NULL); if (rc != 0) { SPDK_ERRLOG("mutex_init() failed\n"); Loading Loading @@ -469,4 +467,3 @@ nvmf_allocate_reactor(uint64_t cpumask) return selected_core; }
lib/nvmf/rdma.c +15 −21 Original line number Diff line number Diff line Loading @@ -212,9 +212,8 @@ nvmf_rdma_conn_cleanup(struct spdk_nvmf_conn *conn) static void nvmf_trace_ibv_sge(struct ibv_sge *sg_list) { SPDK_TRACELOG(SPDK_TRACE_RDMA, "local addr %p\n", (void *)sg_list->addr); SPDK_TRACELOG(SPDK_TRACE_RDMA, "length %x\n", sg_list->length); SPDK_TRACELOG(SPDK_TRACE_RDMA, "lkey %x\n", sg_list->lkey); SPDK_TRACELOG(SPDK_TRACE_RDMA, "local addr %p length 0x%x lkey 0x%x\n", (void *)sg_list->addr, sg_list->length, sg_list->lkey); } static void Loading Loading @@ -244,9 +243,8 @@ nvmf_ibv_send_wr_init(struct ibv_send_wr *wr, wr->wr.rdma.rkey = sgl->keyed.key; wr->wr.rdma.remote_addr = sgl->address; SPDK_TRACELOG(SPDK_TRACE_RDMA, "rkey %x\n", wr->wr.rdma.rkey); SPDK_TRACELOG(SPDK_TRACE_RDMA, "remote addr %p\n", (void *)wr->wr.rdma.remote_addr); SPDK_TRACELOG(SPDK_TRACE_RDMA, "rkey %x remote_addr %p\n", wr->wr.rdma.rkey, (void *)wr->wr.rdma.remote_addr); } nvmf_trace_ibv_sge(wr->sg_list); Loading Loading @@ -333,10 +331,10 @@ nvmf_post_rdma_recv(struct spdk_nvmf_conn *conn, /* for I/O queues we add bb sgl for in-capsule data use */ if (conn->type == CONN_TYPE_IOQ) { wr.num_sge = 2; SPDK_TRACELOG(SPDK_TRACE_DEBUG, "sgl2 local addr %p\n", (void *)rdma_req->bb_sgl.addr); SPDK_TRACELOG(SPDK_TRACE_DEBUG, "sgl2 length %x\n", rdma_req->bb_sgl.length); SPDK_TRACELOG(SPDK_TRACE_DEBUG, "sgl2 lkey %x\n", rdma_req->bb_sgl.lkey); SPDK_TRACELOG(SPDK_TRACE_DEBUG, "sgl2 local addr %p, length 0x%x, lkey 0x%x\n", (void *)rdma_req->bb_sgl.addr, rdma_req->bb_sgl.length, rdma_req->bb_sgl.lkey); } rc = ibv_post_recv(conn->rdma.qp, &wr, &bad_wr); Loading Loading @@ -366,9 +364,6 @@ nvmf_post_rdma_send(struct spdk_nvmf_conn *conn, nvmf_ibv_send_wr_init(&wr, NULL, &rdma_req->send_sgl, (uint64_t)rdma_req, IBV_WR_SEND, IBV_SEND_SIGNALED); SPDK_TRACELOG(SPDK_TRACE_RDMA, "rdma_req %p: req %p, rsp %p\n", rdma_req, req, req->rsp); spdk_trace_record(TRACE_NVMF_IO_COMPLETE, 0, 0, (uint64_t)req, 0); rc = ibv_post_send(conn->rdma.qp, &wr, &bad_wr); if (rc) { Loading Loading @@ -866,7 +861,7 @@ int nvmf_acceptor_start(void) goto listen_error; } sin_port = ntohs(rdma_get_src_port(g_rdma.acceptor_listen_id)); SPDK_NOTICELOG("\n*** NVMf Target Listening on port %d ***\n", sin_port); SPDK_NOTICELOG("*** NVMf Target Listening on port %d ***\n", sin_port); rte_timer_init(&g_rdma.acceptor_timer); rte_timer_reset(&g_rdma.acceptor_timer, ACCEPT_TIMEOUT, PERIODICAL, Loading Loading @@ -901,7 +896,7 @@ nvmf_rdma_init(void) int num_devices_found = 0; int i, ret; SPDK_NOTICELOG("\n*** RDMA Transport Init ***\n"); SPDK_NOTICELOG("*** RDMA Transport Init ***\n"); dev_list = ibv_get_device_list(&num_of_rdma_devices); if (!dev_list) { Loading Loading @@ -998,10 +993,9 @@ nvmf_recv(struct spdk_nvmf_conn *conn, struct ibv_wc *wc) rdma_req = (struct spdk_nvmf_rdma_request *)wc->wr_id; if (wc->byte_len < sizeof(struct spdk_nvmf_capsule_cmd)) { SPDK_ERRLOG("recv length less than capsule header\n"); SPDK_ERRLOG("recv length %u less than capsule header\n", wc->byte_len); return -1; } SPDK_TRACELOG(SPDK_TRACE_NVMF, "recv byte count 0x%x\n", wc->byte_len); req = &rdma_req->req; Loading Loading @@ -1063,7 +1057,7 @@ nvmf_check_rdma_completions(struct spdk_nvmf_conn *conn) switch (wc.opcode) { case IBV_WC_SEND: SPDK_TRACELOG(SPDK_TRACE_RDMA, "\nCQ send completion\n"); SPDK_TRACELOG(SPDK_TRACE_RDMA, "CQ send completion\n"); break; case IBV_WC_RDMA_WRITE: Loading @@ -1071,14 +1065,14 @@ nvmf_check_rdma_completions(struct spdk_nvmf_conn *conn) * Will get this event only if we set IBV_SEND_SIGNALED * flag in rdma_write, to trace rdma write latency */ SPDK_TRACELOG(SPDK_TRACE_RDMA, "\nCQ rdma write completion\n"); SPDK_TRACELOG(SPDK_TRACE_RDMA, "CQ rdma write completion\n"); rdma_req = (struct spdk_nvmf_rdma_request *)wc.wr_id; req = &rdma_req->req; spdk_trace_record(TRACE_RDMA_WRITE_COMPLETE, 0, 0, (uint64_t)req, 0); break; case IBV_WC_RDMA_READ: SPDK_TRACELOG(SPDK_TRACE_RDMA, "\nCQ rdma read completion\n"); SPDK_TRACELOG(SPDK_TRACE_RDMA, "CQ rdma read completion\n"); rdma_req = (struct spdk_nvmf_rdma_request *)wc.wr_id; req = &rdma_req->req; spdk_trace_record(TRACE_RDMA_READ_COMPLETE, 0, 0, (uint64_t)req, 0); Loading @@ -1096,7 +1090,7 @@ nvmf_check_rdma_completions(struct spdk_nvmf_conn *conn) break; case IBV_WC_RECV: SPDK_TRACELOG(SPDK_TRACE_RDMA, "\nCQ recv completion\n"); SPDK_TRACELOG(SPDK_TRACE_RDMA, "CQ recv completion\n"); spdk_trace_record(TRACE_NVMF_IO_START, 0, 0, wc.wr_id, 0); rc = nvmf_recv(conn, &wc); if (rc) { Loading
lib/nvmf/request.c +45 −66 Original line number Diff line number Diff line Loading @@ -52,16 +52,14 @@ spdk_nvmf_request_complete(struct spdk_nvmf_request *req) { struct spdk_nvme_cpl *response = &req->rsp->nvme_cpl; SPDK_TRACELOG(SPDK_TRACE_DEBUG, "send nvme cmd capsule response\n"); response->sqid = 0; response->status.p = 0; response->sqhd = req->conn->sq_head; response->cid = req->cmd->nvme_cmd.cid; SPDK_TRACELOG(SPDK_TRACE_NVMF, "cpl: cdw0=0x%x rsvd1=0x%x sqhd=0x%x sqid=0x%x cid=0x%x status=0x%x\n", response->cdw0, response->rsvd1, response->sqhd, response->sqid, response->cid, "cpl: cid=%u cdw0=0x%08x rsvd1=%u sqhd=%u status=0x%04x\n", response->cid, response->cdw0, response->rsvd1, response->sqhd, *(uint16_t *)&response->status); if (spdk_nvmf_rdma_request_complete(req->conn, req)) { Loading @@ -84,16 +82,13 @@ nvmf_process_admin_cmd(struct spdk_nvmf_request *req) int rc = 0; uint8_t feature; SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_process_admin_cmd: req %p\n", req); /* pre-set response details for this command */ response->status.sc = SPDK_NVME_SC_SUCCESS; response->cid = cmd->cid; /* verify subsystem */ if (subsystem == NULL) { SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_process_admin_cmd: Subsystem Not Initialized!\n"); SPDK_TRACELOG(SPDK_TRACE_NVMF, "Subsystem Not Initialized!\n"); response->status.sc = SPDK_NVME_SC_INTERNAL_DEVICE_ERROR; return true; } Loading @@ -110,7 +105,7 @@ nvmf_process_admin_cmd(struct spdk_nvmf_request *req) } else { /* verify namespace id */ if (cmd->nsid > MAX_PER_SUBSYSTEM_NAMESPACES) { SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_process_admin_cmd: Invalid NS_ID %x\n", SPDK_TRACELOG(SPDK_TRACE_NVMF, "Invalid NS_ID %u\n", cmd->nsid); response->status.sc = SPDK_NVME_SC_INVALID_NAMESPACE_OR_FORMAT; return true; Loading @@ -119,7 +114,7 @@ nvmf_process_admin_cmd(struct spdk_nvmf_request *req) ctrlr = subsystem->ns_list_map[cmd->nsid - 1].ctrlr; nsid = subsystem->ns_list_map[cmd->nsid - 1].nvme_ns_id; } SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_process_admin_cmd: ctrlr %p nvme ns_id %d\n", ctrlr, nsid); SPDK_TRACELOG(SPDK_TRACE_NVMF, "ctrlr %p nvme ns_id %u\n", ctrlr, nsid); switch (cmd->opc) { case SPDK_NVME_OPC_IDENTIFY: Loading @@ -135,7 +130,7 @@ nvmf_process_admin_cmd(struct spdk_nvmf_request *req) SPDK_TRACELOG(SPDK_TRACE_NVMF, "Identify Namespace\n"); if (nsid == 0) { SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_process_admin_cmd: Invalid NS_ID = 0\n"); SPDK_TRACELOG(SPDK_TRACE_NVMF, "Invalid NS_ID = 0\n"); response->status.sc = SPDK_NVME_SC_INVALID_NAMESPACE_OR_FORMAT; return true; } Loading Loading @@ -179,7 +174,7 @@ nvmf_process_admin_cmd(struct spdk_nvmf_request *req) feature = cmd->cdw10 & 0xff; /* mask out the FID value */ switch (feature) { case SPDK_NVME_FEAT_NUMBER_OF_QUEUES: SPDK_TRACELOG(SPDK_TRACE_NVMF, "Set Features - Number of Queues, cdw11 %x\n", cmd->cdw11); SPDK_TRACELOG(SPDK_TRACE_NVMF, "Set Features - Number of Queues, cdw11 0x%x\n", cmd->cdw11); /* verify that the contoller is ready to process commands */ if (session->active_queues != 0) { Loading Loading @@ -232,8 +227,7 @@ nvmf_process_admin_cmd(struct spdk_nvmf_request *req) default: passthrough: SPDK_TRACELOG(SPDK_TRACE_NVMF, "RAW Passthrough: Admin Opcode %x for ctrlr %p\n", cmd->opc, ctrlr); SPDK_TRACELOG(SPDK_TRACE_NVMF, "admin_cmd passthrough: opc 0x%02x\n", cmd->opc); cmd->nsid = nsid; rc = spdk_nvme_ctrlr_cmd_admin_raw(ctrlr, cmd, Loading @@ -241,7 +235,7 @@ passthrough: nvmf_complete_cmd, req); if (rc) { SPDK_ERRLOG("nvmf_process_admin_cmd: Error to submit Admin Opcode %x\n", cmd->opc); SPDK_ERRLOG("Error submitting admin opc 0x%02x\n", cmd->opc); response->status.sc = SPDK_NVME_SC_INTERNAL_DEVICE_ERROR; return true; } Loading @@ -267,8 +261,6 @@ nvmf_process_io_cmd(struct spdk_nvmf_request *req) uint32_t io_flags; int rc = 0; SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_process_io_cmd: req %p\n", req); /* pre-set response details for this command */ response = &req->rsp->nvme_cpl; response->status.sc = SPDK_NVME_SC_SUCCESS; Loading @@ -276,21 +268,21 @@ nvmf_process_io_cmd(struct spdk_nvmf_request *req) /* verify subsystem */ if (subsystem == NULL) { SPDK_ERRLOG("nvmf_process_io_cmd: Subsystem Not Initialized!\n"); SPDK_ERRLOG("Subsystem Not Initialized!\n"); response->status.sc = SPDK_NVME_SC_INTERNAL_DEVICE_ERROR; return true; } /* verify that the contoller is ready to process commands */ if (session->vcprop.csts.bits.rdy == 0) { SPDK_ERRLOG("nvmf_process_io_cmd: Subsystem Controller Not Ready!\n"); SPDK_ERRLOG("Subsystem Controller Not Ready!\n"); response->status.sc = SPDK_NVME_SC_NAMESPACE_NOT_READY; return true; } /* verify namespace id */ if (cmd->nsid == 0 || cmd->nsid > MAX_PER_SUBSYSTEM_NAMESPACES) { SPDK_ERRLOG("nvmf_process_io_cmd: Invalid NS_ID %x\n", cmd->nsid); SPDK_ERRLOG("Invalid NS_ID %u\n", cmd->nsid); response->status.sc = SPDK_NVME_SC_INVALID_NAMESPACE_OR_FORMAT; return true; } Loading @@ -312,7 +304,7 @@ nvmf_process_io_cmd(struct spdk_nvmf_request *req) io_flags = cmd->cdw12 & 0xFFFF0000U; if (cmd->opc == SPDK_NVME_OPC_READ) { SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_process_io_cmd: Read; lba address %lx, lba count %x\n", SPDK_TRACELOG(SPDK_TRACE_NVMF, "Read LBA 0x%" PRIx64 ", 0x%x blocks\n", lba_address, lba_count); spdk_trace_record(TRACE_NVMF_LIB_READ_START, 0, 0, (uint64_t)req, 0); rc = spdk_nvme_ns_cmd_read(ns, qpair, Loading @@ -320,7 +312,7 @@ nvmf_process_io_cmd(struct spdk_nvmf_request *req) nvmf_complete_cmd, req, io_flags); } else { SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_process_io_cmd: Write; lba address %lx, lba count %x\n", SPDK_TRACELOG(SPDK_TRACE_NVMF, "Write LBA 0x%" PRIx64 ", 0x%x blocks\n", lba_address, lba_count); spdk_trace_record(TRACE_NVMF_LIB_WRITE_START, 0, 0, (uint64_t)req, 0); rc = spdk_nvme_ns_cmd_write(ns, qpair, Loading @@ -330,7 +322,7 @@ nvmf_process_io_cmd(struct spdk_nvmf_request *req) } break; default: SPDK_TRACELOG(SPDK_TRACE_NVMF, "RAW Passthrough: I/O Opcode %x\n", cmd->opc); SPDK_TRACELOG(SPDK_TRACE_NVMF, "io_cmd passthrough: opc 0x%02x\n", cmd->opc); cmd->nsid = nsid; rc = spdk_nvme_ctrlr_cmd_io_raw(ctrlr, qpair, cmd, Loading @@ -341,7 +333,7 @@ nvmf_process_io_cmd(struct spdk_nvmf_request *req) } if (rc) { SPDK_ERRLOG("nvmf_process_io_cmd: Failed to submit Opcode %x\n", cmd->opc); SPDK_ERRLOG("Failed to submit Opcode 0x%02x\n", cmd->opc); response->status.sc = SPDK_NVME_SC_INTERNAL_DEVICE_ERROR; return true; } Loading Loading @@ -405,15 +397,12 @@ nvmf_process_connect(struct spdk_nvmf_request *req) RTE_VERIFY(connect_data != NULL); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** Connect Capsule *** %p\n", connect); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** cid = %x ***\n", connect->cid); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** recfmt = %x ***\n", connect->recfmt); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** qid = %x ***\n", connect->qid); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** sqsize = %x ***\n", connect->sqsize); SPDK_TRACELOG(SPDK_TRACE_NVMF, "Connect cmd: cid 0x%x recfmt 0x%x qid %u sqsize %u\n", connect->cid, connect->recfmt, connect->qid, connect->sqsize); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** Connect Capsule Data *** %p\n", connect_data); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** cntlid = %x ***\n", connect_data->cntlid); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** hostid = %04x%04x-%04x-%04x-%04x-%04x%04x%04x ***\n", SPDK_TRACELOG(SPDK_TRACE_NVMF, "Connect data:\n"); SPDK_TRACELOG(SPDK_TRACE_NVMF, " cntlid: 0x%04x\n", connect_data->cntlid); SPDK_TRACELOG(SPDK_TRACE_NVMF, " hostid: %04x%04x-%04x-%04x-%04x-%04x%04x%04x\n", htons(*(unsigned short *) &connect_data->hostid[0]), htons(*(unsigned short *) &connect_data->hostid[2]), htons(*(unsigned short *) &connect_data->hostid[4]), Loading @@ -422,8 +411,8 @@ nvmf_process_connect(struct spdk_nvmf_request *req) htons(*(unsigned short *) &connect_data->hostid[10]), htons(*(unsigned short *) &connect_data->hostid[12]), htons(*(unsigned short *) &connect_data->hostid[14])); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** subsiqn = %s ***\n", (char *)&connect_data->subnqn[0]); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** hostiqn = %s ***\n", (char *)&connect_data->hostnqn[0]); SPDK_TRACELOG(SPDK_TRACE_NVMF, " subsiqn: \"%s\"\n", (char *)&connect_data->subnqn[0]); SPDK_TRACELOG(SPDK_TRACE_NVMF, " hostiqn: \"%s\"\n", (char *)&connect_data->hostnqn[0]); response = &req->rsp->connect_rsp; Loading @@ -439,8 +428,7 @@ nvmf_process_connect(struct spdk_nvmf_request *req) } } SPDK_TRACELOG(SPDK_TRACE_NVMF, "send connect capsule response\n"); SPDK_TRACELOG(SPDK_TRACE_NVMF, " *** cntlid = %x ***\n", SPDK_TRACELOG(SPDK_TRACE_NVMF, "connect capsule response: cntlid = 0x%04x\n", response->status_code_specific.success.cntlid); return true; } Loading Loading @@ -473,47 +461,41 @@ nvmf_trace_command(union nvmf_h2c_msg *h2c_msg, enum conn_type conn_type) struct spdk_nvmf_capsule_cmd *cap_hdr = &h2c_msg->nvmf_cmd; struct spdk_nvme_cmd *cmd = &h2c_msg->nvme_cmd; struct spdk_nvme_sgl_descriptor *sgl = &cmd->dptr.sgl1; const char *cmd_type; uint8_t opc; SPDK_TRACELOG(SPDK_TRACE_NVMF, "NVMf %s%s Command:\n", conn_type == CONN_TYPE_AQ ? "Admin" : "I/O", cmd->opc == SPDK_NVME_OPC_FABRIC ? " Fabrics" : ""); cmd_type = conn_type == CONN_TYPE_AQ ? "Admin" : "I/O"; if (cmd->opc == SPDK_NVME_OPC_FABRIC) { opc = cap_hdr->fctype; SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: fctype 0x%02x\n", cap_hdr->fctype); SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: cid 0x%x\n", cap_hdr->cid); SPDK_TRACELOG(SPDK_TRACE_NVMF, "%s Fabrics cmd: fctype 0x%02x cid %u\n", cmd_type, cap_hdr->fctype, cap_hdr->cid); } else { opc = cmd->opc; SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: opc 0x%02x\n", cmd->opc); if (cmd->fuse) { SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: fuse %x\n", cmd->fuse); } SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: psdt %u\n", cmd->psdt); SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: cid 0x%x\n", cmd->cid); SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: nsid %u\n", cmd->nsid); SPDK_TRACELOG(SPDK_TRACE_NVMF, "%s cmd: opc 0x%02x fuse %u cid %u nsid %u cdw10 0x%08x\n", cmd_type, cmd->opc, cmd->fuse, cmd->cid, cmd->nsid, cmd->cdw10); if (cmd->mptr) { SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: mptr 0x%" PRIx64 "\n", cmd->mptr); SPDK_TRACELOG(SPDK_TRACE_NVMF, "mptr 0x%" PRIx64 "\n", cmd->mptr); } if (cmd->psdt != SPDK_NVME_PSDT_SGL_MPTR_CONTIG && cmd->psdt != SPDK_NVME_PSDT_SGL_MPTR_SGL) { SPDK_TRACELOG(SPDK_TRACE_NVMF, "psdt %u\n", cmd->psdt); } SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: cdw10 0x%08x\n", cmd->cdw10); } if (spdk_nvme_opc_get_data_transfer(opc) != SPDK_NVME_DATA_NONE) { SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: SGL type 0x%x\n", sgl->generic.type); SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: SGL subtype 0x%x\n", sgl->generic.subtype); if (sgl->generic.type == SPDK_NVME_SGL_TYPE_KEYED_DATA_BLOCK) { SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: SGL address 0x%lx\n", sgl->address); SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: SGL key 0x%x\n", sgl->keyed.key); SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: SGL length 0x%x\n", sgl->keyed.length); SPDK_TRACELOG(SPDK_TRACE_NVMF, "SGL: Keyed%s: addr 0x%" PRIx64 " key 0x%x len 0x%x\n", sgl->generic.subtype == SPDK_NVME_SGL_SUBTYPE_INVALIDATE_KEY ? " (Inv)" : "", sgl->address, sgl->keyed.key, sgl->keyed.length); } else if (sgl->generic.type == SPDK_NVME_SGL_TYPE_DATA_BLOCK) { SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: SGL %s 0x%" PRIx64 "\n", sgl->unkeyed.subtype == SPDK_NVME_SGL_SUBTYPE_OFFSET ? "offset" : "address", sgl->address); SPDK_TRACELOG(SPDK_TRACE_NVMF, " SQE: SGL length 0x%x\n", sgl->unkeyed.length); SPDK_TRACELOG(SPDK_TRACE_NVMF, "SGL: Data block: %s 0x%" PRIx64 " len 0x%x\n", sgl->unkeyed.subtype == SPDK_NVME_SGL_SUBTYPE_OFFSET ? "offs" : "addr", sgl->address, sgl->unkeyed.length); } else { SPDK_TRACELOG(SPDK_TRACE_NVMF, "SGL type 0x%x subtype 0x%x\n", sgl->generic.type, sgl->generic.subtype); } } } Loading Loading @@ -547,9 +529,6 @@ spdk_nvmf_request_prep_data(struct spdk_nvmf_request *req, if (sgl->generic.type == SPDK_NVME_SGL_TYPE_KEYED_DATA_BLOCK && (sgl->keyed.subtype == SPDK_NVME_SGL_SUBTYPE_ADDRESS || sgl->keyed.subtype == SPDK_NVME_SGL_SUBTYPE_INVALIDATE_KEY)) { SPDK_TRACELOG(SPDK_TRACE_NVMF, "Keyed data block: raddr 0x%" PRIx64 ", rkey 0x%x, length 0x%x\n", sgl->address, sgl->keyed.key, sgl->keyed.length); if (sgl->keyed.length > bb_len) { SPDK_ERRLOG("SGL length 0x%x exceeds BB length 0x%x\n", sgl->keyed.length, bb_len); Loading
lib/nvmf/session.c +0 −1 Original line number Diff line number Diff line Loading @@ -333,7 +333,6 @@ nvmf_complete_cmd(void *ctx, const struct spdk_nvme_cpl *cmp) struct spdk_nvme_cpl *response; spdk_trace_record(TRACE_NVMF_LIB_COMPLETE, 0, 0, (uint64_t)req, 0); SPDK_TRACELOG(SPDK_TRACE_NVMF, "nvmf_complete_cmd callback: req %p\n", req); response = &req->rsp->nvme_cpl; memcpy(response, cmp, sizeof(*cmp)); Loading