nvmf: drop global nvme_request_pool
It is just a duplicate of the NVMe library request_mempool. Change-Id: I2a5484e5d515b965503b2cfcd8d85ccfcb0dee05 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
dcc055e31f
commit
6e415c4411
@ -87,18 +87,17 @@ spdk_nvmf_initialize_pools(struct spdk_nvmf_globals *spdk_nvmf)
|
|||||||
SPDK_NOTICELOG("\n*** NVMf Pool Creation ***\n");
|
SPDK_NOTICELOG("\n*** NVMf Pool Creation ***\n");
|
||||||
|
|
||||||
/* create NVMe backend request pool */
|
/* create NVMe backend request pool */
|
||||||
spdk_nvmf->nvme_request_pool = rte_mempool_create("NVMe_Pool",
|
request_mempool = rte_mempool_create("NVMe_Pool",
|
||||||
SPDK_NVMF_DESC_POOL_SIZE(spdk_nvmf),
|
SPDK_NVMF_DESC_POOL_SIZE(spdk_nvmf),
|
||||||
spdk_nvme_request_size(),
|
spdk_nvme_request_size(),
|
||||||
128, 0,
|
128, 0,
|
||||||
NULL, NULL, NULL, NULL,
|
NULL, NULL, NULL, NULL,
|
||||||
SOCKET_ID_ANY, 0);
|
SOCKET_ID_ANY, 0);
|
||||||
if (!spdk_nvmf->nvme_request_pool) {
|
if (!request_mempool) {
|
||||||
SPDK_ERRLOG("create NVMe request pool failed\n");
|
SPDK_ERRLOG("create NVMe request pool failed\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/* set global pointer for this pool referenced by libraries */
|
|
||||||
request_mempool = spdk_nvmf->nvme_request_pool;
|
|
||||||
SPDK_TRACELOG(SPDK_TRACE_DEBUG, "NVMe request_mempool %p, size 0x%u bytes\n",
|
SPDK_TRACELOG(SPDK_TRACE_DEBUG, "NVMe request_mempool %p, size 0x%u bytes\n",
|
||||||
request_mempool,
|
request_mempool,
|
||||||
(unsigned int)(SPDK_NVMF_DESC_POOL_SIZE(spdk_nvmf) * spdk_nvme_request_size()));
|
(unsigned int)(SPDK_NVMF_DESC_POOL_SIZE(spdk_nvmf) * spdk_nvme_request_size()));
|
||||||
@ -123,7 +122,7 @@ spdk_nvmf_check_pools(void)
|
|||||||
struct spdk_nvmf_globals *spdk_nvmf = &g_nvmf_tgt;
|
struct spdk_nvmf_globals *spdk_nvmf = &g_nvmf_tgt;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
rc += spdk_nvmf_check_pool(spdk_nvmf->nvme_request_pool, SPDK_NVMF_DESC_POOL_SIZE(spdk_nvmf));
|
rc += spdk_nvmf_check_pool(request_mempool, SPDK_NVMF_DESC_POOL_SIZE(spdk_nvmf));
|
||||||
|
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -107,7 +107,6 @@ struct spdk_nvmf_globals {
|
|||||||
int MaxQueueDepth;
|
int MaxQueueDepth;
|
||||||
int MaxConnectionsPerSession;
|
int MaxConnectionsPerSession;
|
||||||
|
|
||||||
struct rte_mempool *nvme_request_pool;
|
|
||||||
uint16_t sin_port;
|
uint16_t sin_port;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user