From fe103c6d22b6635d9e90cbac2f9fc112db43a926 Mon Sep 17 00:00:00 2001 From: Tomasz Duszynski Date: Fri, 21 Sep 2018 16:53:57 +0200 Subject: [PATCH] crypto/mvsam: support AES ECB Add support for AES128/192/256 in ECB mode. Signed-off-by: Tomasz Duszynski Reviewed-by: Natalie Samsonov --- drivers/crypto/mvsam/rte_mrvl_pmd.c | 5 +++++ drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c index 89840f3f7b..a1d3875616 100644 --- a/drivers/crypto/mvsam/rte_mrvl_pmd.c +++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c @@ -94,6 +94,11 @@ struct cipher_params_mapping cipher_map[RTE_CRYPTO_CIPHER_LIST_END] = { .cipher_alg = SAM_CIPHER_AES, .cipher_mode = SAM_CIPHER_CTR, .max_key_len = BITS2BYTES(256) }, + [RTE_CRYPTO_CIPHER_AES_ECB] = { + .supported = ALGO_SUPPORTED, + .cipher_alg = SAM_CIPHER_AES, + .cipher_mode = SAM_CIPHER_ECB, + .max_key_len = BITS2BYTES(256) }, }; /** diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c index d253b8fba1..3d3bbf1a49 100644 --- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c +++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c @@ -298,6 +298,26 @@ static const struct rte_cryptodev_capabilities }, } }, } }, + { /* AES ECB */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, + {.cipher = { + .algo = RTE_CRYPTO_CIPHER_AES_ECB, + .block_size = 16, + .key_size = { + .min = 16, + .max = 32, + .increment = 8 + }, + .iv_size = { + .min = 0, + .max = 0, + .increment = 0 + } + }, } + }, } + }, { /* AES GCM */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, {.sym = { -- 2.20.1