Commit 34c48f1b authored by Ben Walker's avatar Ben Walker Committed by Tomasz Zawadzki
Browse files

accel: Do not refer to the "framework" as "engine"



The word engine was both used (interchangeably with module) to refer to
the things that plug into the framework and to the framework itself.
This patch eliminates all use of the word engine that meant the
framework. It leaves uses of the word that meant "module".

Change-Id: I6b9b50e2f045ac39f2a74d0152ee8d6269be4bd1
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13918


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
parent dd7140e6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
	run_test "dpdk_mem_utility" test/dpdk_memory_utility/test_dpdk_mem_info.sh
	run_test "event" test/event/event.sh
	run_test "thread" test/thread/thread.sh
	run_test "accel_engine" test/accel_engine/accel_engine.sh
	run_test "accel" test/accel/accel.sh

	if [ $SPDK_TEST_BLOCKDEV -eq 1 ]; then
		run_test "blockdev_general" test/bdev/blockdev.sh
+1 −1
Original line number Diff line number Diff line
@@ -628,7 +628,7 @@ _init_thread(void *arg1)
	worker->next = g_workers;
	g_workers = worker;
	pthread_mutex_unlock(&g_workers_lock);
	worker->ch = spdk_accel_engine_get_io_channel();
	worker->ch = spdk_accel_get_io_channel();
	if (worker->ch == NULL) {
		fprintf(stderr, "Unable to get an accel channel\n");
		goto error;
+11 −11
Original line number Diff line number Diff line
@@ -4,11 +4,11 @@
 */

/** \file
 * Acceleration engine abstraction layer
 * Acceleration Framework
 */

#ifndef SPDK_ACCEL_ENGINE_H
#define SPDK_ACCEL_ENGINE_H
#ifndef SPDK_ACCEL_H
#define SPDK_ACCEL_H

#include "spdk/stdinc.h"

@@ -40,35 +40,35 @@ enum accel_opcode {
typedef void (*spdk_accel_completion_cb)(void *ref, int status);

/**
 * Acceleration engine finish callback.
 * Acceleration framework finish callback.
 *
 * \param cb_arg Callback argument.
 */
typedef void (*spdk_accel_fini_cb)(void *cb_arg);

/**
 * Initialize the acceleration engine.
 * Initialize the acceleration framework.
 *
 * \return 0 on success.
 */
int spdk_accel_engine_initialize(void);
int spdk_accel_initialize(void);

/**
 * Close the acceleration engine.
 * Close the acceleration framework.
 *
 * \param cb_fn Called when the close operation completes.
 * \param cb_arg Argument passed to the callback function.
 */
void spdk_accel_engine_finish(spdk_accel_fini_cb cb_fn, void *cb_arg);
void spdk_accel_finish(spdk_accel_fini_cb cb_fn, void *cb_arg);

/**
 * Get the I/O channel registered on the acceleration engine.
 * Get an I/O channel for the acceleration framework.
 *
 * This I/O channel is used to submit copy request.
 * This I/O channel is used to submit requests.
 *
 * \return a pointer to the I/O channel on success, or NULL on failure.
 */
struct spdk_io_channel *spdk_accel_engine_get_io_channel(void);
struct spdk_io_channel *spdk_accel_get_io_channel(void);

/**
 * Submit a copy request.
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ SO_MINOR := 0
SO_SUFFIX := $(SO_VER).$(SO_MINOR)

LIBNAME = accel
C_SRCS = accel_engine.c accel_engine_rpc.c accel_sw.c
C_SRCS = accel.c accel_rpc.c accel_sw.c

SPDK_MAP_FILE = $(abspath $(CURDIR)/spdk_accel.map)

+13 −13
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
#include "spdk/crc32.h"
#include "spdk/util.h"

/* Accelerator Engine Framework: The following provides a top level
/* Accelerator Framework: The following provides a top level
 * generic API for the accelerator functions defined here. Modules,
 * such as the one in /module/accel/ioat, supply the implementation
 * with the exception of the pure software implementation contained
@@ -483,7 +483,7 @@ spdk_accel_module_list_add(struct spdk_accel_module_if *accel_module)

/* Framework level channel create callback. */
static int
accel_engine_create_cb(void *io_device, void *ctx_buf)
accel_create_channel(void *io_device, void *ctx_buf)
{
	struct accel_io_channel	*accel_ch = ctx_buf;
	struct spdk_accel_task *accel_task;
@@ -523,7 +523,7 @@ err:

/* Framework level channel destroy callback. */
static void
accel_engine_destroy_cb(void *io_device, void *ctx_buf)
accel_destroy_channel(void *io_device, void *ctx_buf)
{
	struct accel_io_channel	*accel_ch = ctx_buf;
	int i;
@@ -538,13 +538,13 @@ accel_engine_destroy_cb(void *io_device, void *ctx_buf)
}

struct spdk_io_channel *
spdk_accel_engine_get_io_channel(void)
spdk_accel_get_io_channel(void)
{
	return spdk_get_io_channel(&spdk_accel_module_list);
}

static void
accel_engine_module_initialize(void)
accel_module_initialize(void)
{
	struct spdk_accel_module_if *accel_engine_module;

@@ -554,13 +554,13 @@ accel_engine_module_initialize(void)
}

int
spdk_accel_engine_initialize(void)
spdk_accel_initialize(void)
{
	enum accel_opcode op;
	struct spdk_accel_module_if *accel_module = NULL;

	g_engine_started = true;
	accel_engine_module_initialize();
	accel_module_initialize();

	/* Create our priority global map of opcodes to engines, we populate starting
	 * with the software engine (guaranteed to be first on the list) and then
@@ -599,17 +599,17 @@ spdk_accel_engine_initialize(void)
	}
#endif
	/*
	 * We need a unique identifier for the accel engine framework, so use the
	 * We need a unique identifier for the accel framework, so use the
	 * spdk_accel_module_list address for this purpose.
	 */
	spdk_io_device_register(&spdk_accel_module_list, accel_engine_create_cb, accel_engine_destroy_cb,
				sizeof(struct accel_io_channel), "accel_module");
	spdk_io_device_register(&spdk_accel_module_list, accel_create_channel, accel_destroy_channel,
				sizeof(struct accel_io_channel), "accel");

	return 0;
}

static void
accel_engine_module_finish_cb(void)
accel_module_finish_cb(void)
{
	spdk_accel_fini_cb cb_fn = g_fini_cb_fn;

@@ -646,7 +646,7 @@ spdk_accel_module_finish(void)
	}

	if (!g_accel_engine_module) {
		accel_engine_module_finish_cb();
		accel_module_finish_cb();
		return;
	}

@@ -658,7 +658,7 @@ spdk_accel_module_finish(void)
}

void
spdk_accel_engine_finish(spdk_accel_fini_cb cb_fn, void *cb_arg)
spdk_accel_finish(spdk_accel_fini_cb cb_fn, void *cb_arg)
{
	enum accel_opcode op;

Loading