Loading lib/nvmf/conf.c +6 −3 Original line number Diff line number Diff line Loading @@ -60,6 +60,10 @@ struct spdk_nvmf_probe_ctx { int function; }; #define SPDK_NVMF_CONFIG_QUEUES_PER_SESSION_DEFAULT 4 #define SPDK_NVMF_CONFIG_QUEUES_PER_SESSION_MIN 2 #define SPDK_NVMF_CONFIG_QUEUES_PER_SESSION_MAX 1024 static int spdk_nvmf_parse_nvmf_tgt(void) { Loading @@ -80,9 +84,8 @@ spdk_nvmf_parse_nvmf_tgt(void) } max_queues_per_sess = spdk_conf_section_get_intval(sp, "MaxQueuesPerSession"); if (max_queues_per_sess < 0) { max_queues_per_sess = SPDK_NVMF_DEFAULT_MAX_QUEUES_PER_SESSION; } max_queues_per_sess = nvmf_max(max_queues_per_sess, SPDK_NVMF_CONFIG_QUEUES_PER_SESSION_MIN); max_queues_per_sess = nvmf_min(max_queues_per_sess, SPDK_NVMF_CONFIG_QUEUES_PER_SESSION_MAX); rc = nvmf_tgt_init(max_queue_depth, max_queues_per_sess); return rc; Loading lib/nvmf/nvmf.c +1 −9 Original line number Diff line number Diff line Loading @@ -130,15 +130,7 @@ nvmf_tgt_init(int max_queue_depth, int max_queues_per_sess) return -EINVAL; } if (max_queues_per_sess >= 1 && max_queues_per_sess <= SPDK_NVMF_DEFAULT_MAX_QUEUES_PER_SESSION) { g_nvmf_tgt.max_queues_per_session = max_queues_per_sess; SPDK_TRACELOG(SPDK_TRACE_DEBUG, "MaxQueuesPerSession: %d\n", g_nvmf_tgt.max_queues_per_session); } else { SPDK_ERRLOG("Invalid MaxQueuesPerSession: %d\n", max_queues_per_sess); return -EINVAL; } rc = pthread_mutex_init(&g_nvmf_tgt.mutex, NULL); if (rc != 0) { Loading lib/nvmf/nvmf_internal.h +1 −1 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ #include "spdk/queue.h" #define nvmf_min(a,b) (((a)<(b))?(a):(b)) #define nvmf_max(a,b) (((a)>(b))?(a):(b)) #define DEFAULT_BB_SIZE (128 * 1024) Loading @@ -56,7 +57,6 @@ #define SPDK_NVMF_DEFAULT_NUM_SESSIONS_PER_LCORE 1 #define SPDK_NVMF_DEFAULT_MAX_QUEUE_DEPTH 128 #define SPDK_NVMF_DEFAULT_MAX_QUEUES_PER_SESSION 4 #define SPDK_NVMF_DEFAULT_SIN_PORT ((uint16_t)4420) #define OBJECT_NVMF_IO 0x30 Loading Loading
lib/nvmf/conf.c +6 −3 Original line number Diff line number Diff line Loading @@ -60,6 +60,10 @@ struct spdk_nvmf_probe_ctx { int function; }; #define SPDK_NVMF_CONFIG_QUEUES_PER_SESSION_DEFAULT 4 #define SPDK_NVMF_CONFIG_QUEUES_PER_SESSION_MIN 2 #define SPDK_NVMF_CONFIG_QUEUES_PER_SESSION_MAX 1024 static int spdk_nvmf_parse_nvmf_tgt(void) { Loading @@ -80,9 +84,8 @@ spdk_nvmf_parse_nvmf_tgt(void) } max_queues_per_sess = spdk_conf_section_get_intval(sp, "MaxQueuesPerSession"); if (max_queues_per_sess < 0) { max_queues_per_sess = SPDK_NVMF_DEFAULT_MAX_QUEUES_PER_SESSION; } max_queues_per_sess = nvmf_max(max_queues_per_sess, SPDK_NVMF_CONFIG_QUEUES_PER_SESSION_MIN); max_queues_per_sess = nvmf_min(max_queues_per_sess, SPDK_NVMF_CONFIG_QUEUES_PER_SESSION_MAX); rc = nvmf_tgt_init(max_queue_depth, max_queues_per_sess); return rc; Loading
lib/nvmf/nvmf.c +1 −9 Original line number Diff line number Diff line Loading @@ -130,15 +130,7 @@ nvmf_tgt_init(int max_queue_depth, int max_queues_per_sess) return -EINVAL; } if (max_queues_per_sess >= 1 && max_queues_per_sess <= SPDK_NVMF_DEFAULT_MAX_QUEUES_PER_SESSION) { g_nvmf_tgt.max_queues_per_session = max_queues_per_sess; SPDK_TRACELOG(SPDK_TRACE_DEBUG, "MaxQueuesPerSession: %d\n", g_nvmf_tgt.max_queues_per_session); } else { SPDK_ERRLOG("Invalid MaxQueuesPerSession: %d\n", max_queues_per_sess); return -EINVAL; } rc = pthread_mutex_init(&g_nvmf_tgt.mutex, NULL); if (rc != 0) { Loading
lib/nvmf/nvmf_internal.h +1 −1 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ #include "spdk/queue.h" #define nvmf_min(a,b) (((a)<(b))?(a):(b)) #define nvmf_max(a,b) (((a)>(b))?(a):(b)) #define DEFAULT_BB_SIZE (128 * 1024) Loading @@ -56,7 +57,6 @@ #define SPDK_NVMF_DEFAULT_NUM_SESSIONS_PER_LCORE 1 #define SPDK_NVMF_DEFAULT_MAX_QUEUE_DEPTH 128 #define SPDK_NVMF_DEFAULT_MAX_QUEUES_PER_SESSION 4 #define SPDK_NVMF_DEFAULT_SIN_PORT ((uint16_t)4420) #define OBJECT_NVMF_IO 0x30 Loading