nvme/rdma: Always use spdk allocation scheme
Use the conventional huge-pages based spdk allocation scheme for the initiator data-structures unconditionally. Change-Id: I5baee7614e3ac9b5497b3d771dfddfbaa7fdf65b Signed-off-by: Or Gerlitz <ogerlitz@nvidia.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12687 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Dong Yi <dongx.yi@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
895300d840
commit
9b5dabff7f
@ -404,21 +404,13 @@ nvme_rdma_calloc(size_t nmemb, size_t size)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g_nvme_hooks.get_rkey) {
|
return spdk_zmalloc(nmemb * size, 0, NULL, SPDK_ENV_SOCKET_ID_ANY, SPDK_MALLOC_DMA);
|
||||||
return calloc(nmemb, size);
|
|
||||||
} else {
|
|
||||||
return spdk_zmalloc(nmemb * size, 0, NULL, SPDK_ENV_SOCKET_ID_ANY, SPDK_MALLOC_DMA);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
nvme_rdma_free(void *buf)
|
nvme_rdma_free(void *buf)
|
||||||
{
|
{
|
||||||
if (!g_nvme_hooks.get_rkey) {
|
spdk_free(buf);
|
||||||
free(buf);
|
|
||||||
} else {
|
|
||||||
spdk_free(buf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int nvme_rdma_ctrlr_delete_io_qpair(struct spdk_nvme_ctrlr *ctrlr,
|
static int nvme_rdma_ctrlr_delete_io_qpair(struct spdk_nvme_ctrlr *ctrlr,
|
||||||
|
Loading…
Reference in New Issue
Block a user