From 6a86385dade5c48c86ec1bdcdbaca44c250f6269 Mon Sep 17 00:00:00 2001 From: Konrad Sztyber Date: Wed, 1 Mar 2023 14:00:46 +0100 Subject: [PATCH] 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: Konrad Sztyber Change-Id: I46ea2e6794e00590930651c5ff8c36588de641b4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17042 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker Reviewed-by: Aleksey Marchuk --- module/bdev/crypto/vbdev_crypto.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/module/bdev/crypto/vbdev_crypto.c b/module/bdev/crypto/vbdev_crypto.c index 3825fb24a..44db9af2a 100644 --- a/module/bdev/crypto/vbdev_crypto.c +++ b/module/bdev/crypto/vbdev_crypto.c @@ -695,14 +695,27 @@ 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, - .submit_request = vbdev_crypto_submit_request, - .io_type_supported = vbdev_crypto_io_type_supported, - .get_io_channel = vbdev_crypto_get_io_channel, - .dump_info_json = vbdev_crypto_dump_info_json, - .get_memory_domains = vbdev_crypto_get_memory_domains, + .destruct = vbdev_crypto_destruct, + .submit_request = vbdev_crypto_submit_request, + .io_type_supported = vbdev_crypto_io_type_supported, + .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 = {