nvmf: Rename MaxConnectionsPerSession to MaxQueuesPerSession
Change-Id: I9891f9ed481b93312152c2a59f4263003167f1d6 Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
207223c4f4
commit
88245ea26b
@ -57,7 +57,7 @@ spdk_nvmf_parse_nvmf_tgt(void)
|
|||||||
{
|
{
|
||||||
struct spdk_conf_section *sp;
|
struct spdk_conf_section *sp;
|
||||||
int max_queue_depth;
|
int max_queue_depth;
|
||||||
int max_conn_per_sess;
|
int max_queues_per_sess;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
sp = spdk_conf_find_section(NULL, "Nvmf");
|
sp = spdk_conf_find_section(NULL, "Nvmf");
|
||||||
@ -71,12 +71,12 @@ spdk_nvmf_parse_nvmf_tgt(void)
|
|||||||
max_queue_depth = SPDK_NVMF_DEFAULT_MAX_QUEUE_DEPTH;
|
max_queue_depth = SPDK_NVMF_DEFAULT_MAX_QUEUE_DEPTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
max_conn_per_sess = spdk_conf_section_get_intval(sp, "MaxConnectionsPerSession");
|
max_queues_per_sess = spdk_conf_section_get_intval(sp, "MaxQueuesPerSession");
|
||||||
if (max_conn_per_sess < 0) {
|
if (max_queues_per_sess < 0) {
|
||||||
max_conn_per_sess = SPDK_NVMF_DEFAULT_MAX_CONNECTIONS_PER_SESSION;
|
max_queues_per_sess = SPDK_NVMF_DEFAULT_MAX_QUEUES_PER_SESSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = nvmf_tgt_init(max_queue_depth, max_conn_per_sess);
|
rc = nvmf_tgt_init(max_queue_depth, max_queues_per_sess);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ spdk_nvmf_initialize_pools(void)
|
|||||||
{
|
{
|
||||||
SPDK_NOTICELOG("\n*** NVMf Pool Creation ***\n");
|
SPDK_NOTICELOG("\n*** NVMf Pool Creation ***\n");
|
||||||
|
|
||||||
g_num_requests = MAX_SUBSYSTEMS * g_nvmf_tgt.MaxConnectionsPerSession * g_nvmf_tgt.MaxQueueDepth;
|
g_num_requests = MAX_SUBSYSTEMS * g_nvmf_tgt.max_queues_per_session * g_nvmf_tgt.MaxQueueDepth;
|
||||||
|
|
||||||
/* create NVMe backend request pool */
|
/* create NVMe backend request pool */
|
||||||
request_mempool = rte_mempool_create("NVMe_Pool",
|
request_mempool = rte_mempool_create("NVMe_Pool",
|
||||||
@ -117,7 +117,7 @@ spdk_nvmf_check_pools(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
nvmf_tgt_init(int max_queue_depth, int max_conn_per_sess)
|
nvmf_tgt_init(int max_queue_depth, int max_queues_per_sess)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
@ -131,13 +131,13 @@ nvmf_tgt_init(int max_queue_depth, int max_conn_per_sess)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (max_conn_per_sess >= 1 &&
|
if (max_queues_per_sess >= 1 &&
|
||||||
max_conn_per_sess <= SPDK_NVMF_DEFAULT_MAX_CONNECTIONS_PER_SESSION) {
|
max_queues_per_sess <= SPDK_NVMF_DEFAULT_MAX_QUEUES_PER_SESSION) {
|
||||||
g_nvmf_tgt.MaxConnectionsPerSession = max_conn_per_sess;
|
g_nvmf_tgt.max_queues_per_session = max_queues_per_sess;
|
||||||
SPDK_TRACELOG(SPDK_TRACE_DEBUG, "MaxConnectionsPerSession: %d\n",
|
SPDK_TRACELOG(SPDK_TRACE_DEBUG, "MaxQueuesPerSession: %d\n",
|
||||||
g_nvmf_tgt.MaxConnectionsPerSession);
|
g_nvmf_tgt.max_queues_per_session);
|
||||||
} else {
|
} else {
|
||||||
SPDK_ERRLOG("Invalid MaxConnectionsPerSession: %d\n", max_conn_per_sess);
|
SPDK_ERRLOG("Invalid MaxQueuesPerSession: %d\n", max_queues_per_sess);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
#define SPDK_NVMF_DEFAULT_NUM_SESSIONS_PER_LCORE 1
|
#define SPDK_NVMF_DEFAULT_NUM_SESSIONS_PER_LCORE 1
|
||||||
#define SPDK_NVMF_DEFAULT_MAX_QUEUE_DEPTH 128
|
#define SPDK_NVMF_DEFAULT_MAX_QUEUE_DEPTH 128
|
||||||
#define SPDK_NVMF_DEFAULT_MAX_CONNECTIONS_PER_SESSION 4
|
#define SPDK_NVMF_DEFAULT_MAX_QUEUES_PER_SESSION 4
|
||||||
#define SPDK_NVMF_DEFAULT_SIN_PORT ((uint16_t)4420)
|
#define SPDK_NVMF_DEFAULT_SIN_PORT ((uint16_t)4420)
|
||||||
|
|
||||||
#define OBJECT_NVMF_IO 0x30
|
#define OBJECT_NVMF_IO 0x30
|
||||||
@ -100,7 +100,7 @@ struct spdk_nvmf_globals {
|
|||||||
pthread_mutex_t mutex;
|
pthread_mutex_t mutex;
|
||||||
|
|
||||||
int MaxQueueDepth;
|
int MaxQueueDepth;
|
||||||
int MaxConnectionsPerSession;
|
int max_queues_per_session;
|
||||||
|
|
||||||
uint16_t sin_port;
|
uint16_t sin_port;
|
||||||
};
|
};
|
||||||
|
@ -246,7 +246,7 @@ spdk_nvmf_session_connect(struct spdk_nvmf_conn *conn,
|
|||||||
TAILQ_INIT(&session->connections);
|
TAILQ_INIT(&session->connections);
|
||||||
session->num_connections = 0;
|
session->num_connections = 0;
|
||||||
session->subsys = subsystem;
|
session->subsys = subsystem;
|
||||||
session->max_connections_allowed = g_nvmf_tgt.MaxConnectionsPerSession;
|
session->max_connections_allowed = g_nvmf_tgt.max_queues_per_session;
|
||||||
|
|
||||||
if (subsystem->subtype == SPDK_NVMF_SUBTYPE_NVME) {
|
if (subsystem->subtype == SPDK_NVMF_SUBTYPE_NVME) {
|
||||||
nvmf_init_nvme_session_properties(session);
|
nvmf_init_nvme_session_properties(session);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
LogFacility "local7"
|
LogFacility "local7"
|
||||||
|
|
||||||
[Nvmf]
|
[Nvmf]
|
||||||
MaxConnectionsPerSession 4
|
MaxQueuesPerSession 4
|
||||||
|
|
||||||
[Nvme]
|
[Nvme]
|
||||||
ClaimAllDevices Yes
|
ClaimAllDevices Yes
|
||||||
|
Loading…
Reference in New Issue
Block a user