Commit 6a86385d authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Ben Walker
Browse files

bdev/crypto: report accel sequence support



The code was already ready for that, so it's only a matter of reporting
that to the bdev layer.

Signed-off-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I46ea2e6794e00590930651c5ff8c36588de641b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17042


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
parent 43cf39be
Loading
Loading
Loading
Loading
+19 −6
Original line number Diff line number Diff line
@@ -695,6 +695,18 @@ vbdev_crypto_get_memory_domains(void *ctx, struct spdk_memory_domain **domains,
	return num_domains + 1;
}

static bool
vbdev_crypto_sequence_supported(void *ctx, enum spdk_bdev_io_type type)
{
	switch (type) {
	case SPDK_BDEV_IO_TYPE_READ:
	case SPDK_BDEV_IO_TYPE_WRITE:
		return true;
	default:
		return false;
	}
}

/* When we register our bdev this is how we specify our entry points. */
static const struct spdk_bdev_fn_table vbdev_crypto_fn_table = {
	.destruct			= vbdev_crypto_destruct,
@@ -703,6 +715,7 @@ static const struct spdk_bdev_fn_table vbdev_crypto_fn_table = {
	.get_io_channel			= vbdev_crypto_get_io_channel,
	.dump_info_json			= vbdev_crypto_dump_info_json,
	.get_memory_domains		= vbdev_crypto_get_memory_domains,
	.accel_sequence_supported	= vbdev_crypto_sequence_supported,
};

static struct spdk_bdev_module crypto_if = {