Commit 74af66b2 authored by Yankun Li's avatar Yankun Li Committed by Konrad Sztyber
Browse files

lib/accel: Check if compress and decompress are same module



Change-Id: I0fc8c3dc8edf3da9352cb49341b9db3a43653521
Signed-off-by: default avatarYankun Li <845245370@qq.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24874


Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Reviewed-by: default avatarGangCao <gang.cao@intel.com>
parent 73c0be85
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3181,6 +3181,11 @@ spdk_accel_initialize(void)
		SPDK_ERRLOG("Different accel modules are assigned to encrypt and decrypt operations");
		return -EINVAL;
	}
	if (g_modules_opc[SPDK_ACCEL_OPC_COMPRESS].module !=
	    g_modules_opc[SPDK_ACCEL_OPC_DECOMPRESS].module) {
		SPDK_ERRLOG("Different accel modules are assigned to compress and decompress operations");
		return -EINVAL;
	}

	for (op = 0; op < SPDK_ACCEL_OPC_LAST; op++) {
		assert(g_modules_opc[op].module != NULL);