accel_engine/ioat: If no ioat devices found, we should return.

If no ioat devices are registered, we should return.

Change-Id: I03435946716ef653b230515da32e8ccbdf5a188a
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7834
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Ziye Yang 2021-05-11 21:14:33 +08:00 committed by Tomasz Zawadzki
parent 9442881ab9
commit 00c9dd5879

View File

@ -280,6 +280,11 @@ accel_engine_ioat_init(void)
return -1;
}
if (TAILQ_EMPTY(&g_devices)) {
SPDK_NOTICELOG("No available ioat devices\n");
return -1;
}
g_ioat_initialized = true;
SPDK_NOTICELOG("Accel engine updated to use IOAT engine.\n");
spdk_accel_hw_engine_register(&ioat_accel_engine);