nvmf: Combine nvmf_tgt_init and nvmf_transport_init

Change-Id: I6d0f92842f3b8626bc2c25b38bfa7f7ddea5e7cc
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Ben Walker 2016-10-10 15:05:37 -07:00 committed by Jim Harris
parent 3cbed2ed86
commit bb5d8e506c
4 changed files with 14 additions and 10 deletions

View File

@ -216,9 +216,9 @@ spdk_nvmf_parse_nvmf_tgt(void)
}
g_spdk_nvmf_tgt_conf.acceptor_poll_rate = acceptor_poll_rate;
rc = nvmf_tgt_init(max_queue_depth, max_queues_per_sess, in_capsule_data_size, max_io_size);
rc = spdk_nvmf_tgt_init(max_queue_depth, max_queues_per_sess, in_capsule_data_size, max_io_size);
if (rc != 0) {
SPDK_ERRLOG("nvmf_tgt_init() failed\n");
SPDK_ERRLOG("spdk_nvmf_tgt_init() failed\n");
return rc;
}

View File

@ -118,7 +118,7 @@ shutdown_subsystems(void)
static void
acceptor_poller_unregistered_event(struct spdk_event *event)
{
nvmf_tgt_fini();
spdk_nvmf_tgt_fini();
shutdown_subsystems();
}

View File

@ -50,10 +50,10 @@
#define nvmf_min(a,b) (((a)<(b))?(a):(b))
#define nvmf_max(a,b) (((a)>(b))?(a):(b))
int nvmf_tgt_init(uint16_t max_queue_depth, uint16_t max_conn_per_sess,
uint32_t in_capsule_data_size, uint32_t max_io_size);
int spdk_nvmf_tgt_init(uint16_t max_queue_depth, uint16_t max_conn_per_sess,
uint32_t in_capsule_data_size, uint32_t max_io_size);
int nvmf_tgt_fini(void);
int spdk_nvmf_tgt_fini(void);
int spdk_nvmf_check_pools(void);

View File

@ -48,8 +48,8 @@ SPDK_LOG_REGISTER_TRACE_FLAG("nvmf", SPDK_TRACE_NVMF)
struct spdk_nvmf_globals g_nvmf_tgt;
int
nvmf_tgt_init(uint16_t max_queue_depth, uint16_t max_queues_per_sess,
uint32_t in_capsule_data_size, uint32_t max_io_size)
spdk_nvmf_tgt_init(uint16_t max_queue_depth, uint16_t max_queues_per_sess,
uint32_t in_capsule_data_size, uint32_t max_io_size)
{
int rc;
@ -58,6 +58,8 @@ nvmf_tgt_init(uint16_t max_queue_depth, uint16_t max_queues_per_sess,
g_nvmf_tgt.in_capsule_data_size = in_capsule_data_size;
g_nvmf_tgt.max_io_size = max_io_size;
spdk_nvmf_transport_init();
SPDK_TRACELOG(SPDK_TRACE_NVMF, "Max Queues Per Session: %d\n", max_queues_per_sess);
SPDK_TRACELOG(SPDK_TRACE_NVMF, "Max Queue Depth: %d\n", max_queue_depth);
SPDK_TRACELOG(SPDK_TRACE_NVMF, "Max In Capsule Data: %d bytes\n", in_capsule_data_size);
@ -73,9 +75,11 @@ nvmf_tgt_init(uint16_t max_queue_depth, uint16_t max_queues_per_sess,
}
int
nvmf_tgt_fini(void)
spdk_nvmf_tgt_fini(void)
{
return spdk_nvmf_transport_fini();
spdk_nvmf_transport_fini();
return 0;
}
SPDK_TRACE_REGISTER_FN(nvmf_trace)