test/nvme/err_injection: switch to spdk_*malloc().
spdk_dma_*malloc() is about to be deprecated. Change-Id: I3949913f1a69d5c0b0798077cf794b1dbd5bf0cc Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459557 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
294ac20b0f
commit
6b66195d85
@ -158,7 +158,7 @@ read_test_cb(void *cb_arg, const struct spdk_nvme_cpl *cpl)
|
|||||||
struct dev *dev = cb_arg;
|
struct dev *dev = cb_arg;
|
||||||
|
|
||||||
outstanding_commands--;
|
outstanding_commands--;
|
||||||
spdk_dma_free(dev->data);
|
spdk_free(dev->data);
|
||||||
|
|
||||||
if (spdk_nvme_cpl_is_error(cpl) && dev->error_expected) {
|
if (spdk_nvme_cpl_is_error(cpl) && dev->error_expected) {
|
||||||
if (cpl->status.sct != SPDK_NVME_SCT_MEDIA_ERROR ||
|
if (cpl->status.sct != SPDK_NVME_SCT_MEDIA_ERROR ||
|
||||||
@ -184,7 +184,7 @@ read_test(bool error_expected)
|
|||||||
|
|
||||||
foreach_dev(dev) {
|
foreach_dev(dev) {
|
||||||
dev->error_expected = error_expected;
|
dev->error_expected = error_expected;
|
||||||
dev->data = spdk_dma_zmalloc(0x1000, 0x1000, NULL);
|
dev->data = spdk_zmalloc(0x1000, 0x1000, NULL, SPDK_ENV_LCORE_ID_ANY, SPDK_MALLOC_DMA);
|
||||||
if (!dev->data) {
|
if (!dev->data) {
|
||||||
failed = 1;
|
failed = 1;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
Loading…
Reference in New Issue
Block a user