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

accel: Return correct values for .get_ctx_size()



This expects the full size of the task for each module. This only worked
because the software module returned the right size.

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


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.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 678025c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@
#define MAX_TASKS_PER_CHANNEL		0x800

/* Largest context size for all accel modules */
static size_t g_max_accel_module_size = 0;
static size_t g_max_accel_module_size = sizeof(struct spdk_accel_task);

static struct spdk_accel_module_if *g_accel_engine_module = NULL;
static spdk_accel_fini_cb g_fini_cb_fn = NULL;
+1 −1
Original line number Diff line number Diff line
@@ -286,7 +286,7 @@ idxd_poll(void *arg)
static size_t
accel_engine_dsa_get_ctx_size(void)
{
	return 0;
	return sizeof(struct spdk_accel_task);
}

static bool
+1 −1
Original line number Diff line number Diff line
@@ -230,7 +230,7 @@ idxd_poll(void *arg)
static size_t
accel_engine_iaa_get_ctx_size(void)
{
	return 0;
	return sizeof(struct spdk_accel_task);
}

static bool
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ static int ioat_submit_tasks(struct spdk_io_channel *ch, struct spdk_accel_task
static size_t
accel_engine_ioat_get_ctx_size(void)
{
	return 0;
	return sizeof(struct spdk_accel_task);
}

static struct spdk_accel_module_if g_ioat_module = {