test/nvme/aer: switch to spdk_*malloc().
spdk_dma_*malloc() is about to be deprecated. Change-Id: I41f8d8ba2cde155074bfc4e0b6c43aa956c6cb40 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459554 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
67ef43544a
commit
e36f9cc73d
@ -244,10 +244,10 @@ cleanup(void)
|
|||||||
|
|
||||||
foreach_dev(dev) {
|
foreach_dev(dev) {
|
||||||
if (dev->health_page) {
|
if (dev->health_page) {
|
||||||
spdk_dma_free(dev->health_page);
|
spdk_free(dev->health_page);
|
||||||
}
|
}
|
||||||
if (dev->changed_ns_list) {
|
if (dev->changed_ns_list) {
|
||||||
spdk_dma_free(dev->changed_ns_list);
|
spdk_free(dev->changed_ns_list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -383,12 +383,14 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
|
|||||||
|
|
||||||
printf("Attached to %s\n", dev->name);
|
printf("Attached to %s\n", dev->name);
|
||||||
|
|
||||||
dev->health_page = spdk_dma_zmalloc(sizeof(*dev->health_page), 4096, NULL);
|
dev->health_page = spdk_zmalloc(sizeof(*dev->health_page), 4096, NULL, SPDK_ENV_LCORE_ID_ANY,
|
||||||
|
SPDK_MALLOC_DMA);
|
||||||
if (dev->health_page == NULL) {
|
if (dev->health_page == NULL) {
|
||||||
printf("Allocation error (health page)\n");
|
printf("Allocation error (health page)\n");
|
||||||
g_failed = 1;
|
g_failed = 1;
|
||||||
}
|
}
|
||||||
dev->changed_ns_list = spdk_dma_zmalloc(sizeof(*dev->changed_ns_list), 4096, NULL);
|
dev->changed_ns_list = spdk_zmalloc(sizeof(*dev->changed_ns_list), 4096, NULL,
|
||||||
|
SPDK_ENV_LCORE_ID_ANY, SPDK_MALLOC_DMA);
|
||||||
if (dev->changed_ns_list == NULL) {
|
if (dev->changed_ns_list == NULL) {
|
||||||
printf("Allocation error (changed namespace list page)\n");
|
printf("Allocation error (changed namespace list page)\n");
|
||||||
g_failed = 1;
|
g_failed = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user