nvmf: Remove max io queue tracking from session

This was intended to track the number of NVMe device
queues per session, but there is only one hardware
queue per session. It was conflated with the number
of RDMA queues in several places as well.

Change-Id: I74a1c56a5d395dea8bee4778882821e904cebcf9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Ben Walker 2016-07-07 16:22:15 -07:00
parent a644cacb56
commit a35de42e5d
3 changed files with 5 additions and 10 deletions

View File

@ -202,7 +202,8 @@ nvmf_process_admin_cmd(struct spdk_nvmf_request *req)
switch (feature) {
case SPDK_NVME_FEAT_NUMBER_OF_QUEUES:
SPDK_TRACELOG(SPDK_TRACE_NVMF, "Get Features - Number of Queues\n");
response->cdw0 = ((session->max_io_queues - 1) << 16) | (session->max_io_queues - 1);
response->cdw0 = ((session->max_connections_allowed - 1) << 16) | (session->max_connections_allowed
- 1);
return true;
default:
goto passthrough;
@ -215,11 +216,12 @@ nvmf_process_admin_cmd(struct spdk_nvmf_request *req)
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) {
if (session->num_connections > 1) {
SPDK_TRACELOG(SPDK_TRACE_NVMF, "Queue pairs already active!\n");
response->status.sc = SPDK_NVME_SC_COMMAND_SEQUENCE_ERROR;
} else {
response->cdw0 = ((session->max_io_queues - 1) << 16) | (session->max_io_queues - 1);
response->cdw0 = ((session->max_connections_allowed - 1) << 16) | (session->max_connections_allowed
- 1);
}
return true;
default:

View File

@ -126,9 +126,6 @@ nvmf_init_nvme_session_properties(struct nvmf_session *session)
SPDK_TRACELOG(SPDK_TRACE_NVMF, " nvmf_init_session_properties: sgls data: 0x%x\n",
*(uint32_t *)&session->vcdata.sgls);
/* feature: Number Of Queues. */
session->max_io_queues = MAX_SESSION_IO_QUEUES;
session->vcprop.cap.raw = 0;
session->vcprop.cap.bits.cqr = 0; /* queues not contiguous */
session->vcprop.cap.bits.mqes = (session->vcdata.maxcmd - 1); /* max queue depth */
@ -150,8 +147,6 @@ nvmf_init_nvme_session_properties(struct nvmf_session *session)
session->vcprop.csts.raw = 0;
session->vcprop.csts.bits.rdy = 0; /* Init controller as not ready */
SPDK_TRACELOG(SPDK_TRACE_NVMF, " nvmf_init_session_properties: max io queues %x\n",
session->max_io_queues);
SPDK_TRACELOG(SPDK_TRACE_NVMF, " nvmf_init_session_properties: cap %" PRIx64 "\n",
session->vcprop.cap.raw);
SPDK_TRACELOG(SPDK_TRACE_NVMF, " nvmf_init_session_properties: vs %x\n", session->vcprop.vs.raw);

View File

@ -54,8 +54,6 @@ struct nvmf_session {
struct spdk_nvmf_subsystem *subsys;
uint16_t cntlid;
uint32_t max_io_queues; /* maximum supported by backend NVMe library */
int active_queues;
struct {
union spdk_nvme_cap_register cap;
union spdk_nvme_vs_register vs;