crypto/mvsam: support AES ECB
authorTomasz Duszynski <tdu@semihalf.com>
Fri, 21 Sep 2018 14:53:57 +0000 (16:53 +0200)
committerAkhil Goyal <akhil.goyal@nxp.com>
Wed, 17 Oct 2018 10:16:54 +0000 (12:16 +0200)
Add support for AES128/192/256 in ECB mode.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Reviewed-by: Natalie Samsonov <nsamsono@marvell.com>
drivers/crypto/mvsam/rte_mrvl_pmd.c
drivers/crypto/mvsam/rte_mrvl_pmd_ops.c

index 89840f3..a1d3875 100644 (file)
@@ -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) },
 };
 
 /**
index d253b8f..3d3bbf1 100644 (file)
@@ -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 = {