Commit 4c9725eb authored by Alexey Marchuk's avatar Alexey Marchuk Committed by Tomasz Zawadzki
Browse files

accel/ioat: Do not register module automatically



Register the module when a dedicated RPC to enable ioat
module is called. With this change this module is not
added to a global list and isn't used at all.

Signed-off-by: default avatarAlexey Marchuk <alexeymar@nvidia.com>
Change-Id: I64ff6ae59827b9f30feefbd6217ac6b1778f449e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18179


Reviewed-by: default avatarJacek Kalwas <jacek.kalwas@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent b85bd63f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
/*   SPDX-License-Identifier: BSD-3-Clause
 *   Copyright (C) 2020 Intel Corporation.
 *   Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
 *   All rights reserved.
 */

@@ -91,8 +92,6 @@ static struct spdk_accel_module_if g_ioat_module = {
	.submit_tasks		= ioat_submit_tasks
};

SPDK_ACCEL_MODULE_REGISTER(ioat, &g_ioat_module)

static void
ioat_done(void *cb_arg)
{
@@ -116,6 +115,7 @@ static bool
ioat_supports_opcode(enum accel_opcode opc)
{
	if (!g_ioat_initialized) {
		assert(0);
		return false;
	}

@@ -126,7 +126,6 @@ ioat_supports_opcode(enum accel_opcode opc)
	default:
		return false;
	}

}

static int
@@ -274,12 +273,14 @@ void
accel_ioat_enable_probe(void)
{
	g_ioat_enable = true;
	spdk_accel_module_list_add(&g_ioat_module);
}

static int
accel_ioat_init(void)
{
	if (!g_ioat_enable) {
		assert(0);
		return 0;
	}