crypto/mvsam: support crypto/auth NULL algorithms
authorTomasz Duszynski <tdu@semihalf.com>
Fri, 21 Sep 2018 14:53:58 +0000 (16:53 +0200)
committerAkhil Goyal <akhil.goyal@nxp.com>
Wed, 17 Oct 2018 10:16:54 +0000 (12:16 +0200)
Add support for both cipher and auth NULL algorithms.

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 a1d3875..3d36203 100644 (file)
@@ -69,6 +69,9 @@ __rte_aligned(32);
  */
 static const
 struct cipher_params_mapping cipher_map[RTE_CRYPTO_CIPHER_LIST_END] = {
+       [RTE_CRYPTO_CIPHER_NULL] = {
+               .supported = ALGO_SUPPORTED,
+               .cipher_alg = SAM_CIPHER_NONE },
        [RTE_CRYPTO_CIPHER_3DES_CBC] = {
                .supported = ALGO_SUPPORTED,
                .cipher_alg = SAM_CIPHER_3DES,
@@ -106,6 +109,9 @@ struct cipher_params_mapping cipher_map[RTE_CRYPTO_CIPHER_LIST_END] = {
  */
 static const
 struct auth_params_mapping auth_map[RTE_CRYPTO_AUTH_LIST_END] = {
+       [RTE_CRYPTO_AUTH_NULL] = {
+               .supported = ALGO_SUPPORTED,
+               .auth_alg = SAM_AUTH_NONE },
        [RTE_CRYPTO_AUTH_MD5_HMAC] = {
                .supported = ALGO_SUPPORTED,
                .auth_alg = SAM_AUTH_HMAC_MD5 },
index 3d3bbf1..f3251aa 100644 (file)
@@ -413,6 +413,51 @@ static const struct rte_cryptodev_capabilities
                        }, }
                }, }
        },
+       {       /* NULL (AUTH) */
+               .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
+               {.sym = {
+                       .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
+                       {.auth = {
+                               .algo = RTE_CRYPTO_AUTH_NULL,
+                               .block_size = 1,
+                               .key_size = {
+                                       .min = 0,
+                                       .max = 0,
+                                       .increment = 0
+                               },
+                               .digest_size = {
+                                       .min = 0,
+                                       .max = 0,
+                                       .increment = 0
+                               },
+                               .iv_size = {
+                                       .min = 0,
+                                       .max = 0,
+                                       .increment = 0
+                               }
+                       }, },
+               }, },
+       },
+       {       /* NULL (CIPHER) */
+               .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
+               {.sym = {
+                       .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
+                       {.cipher = {
+                               .algo = RTE_CRYPTO_CIPHER_NULL,
+                               .block_size = 1,
+                               .key_size = {
+                                       .min = 0,
+                                       .max = 0,
+                                       .increment = 0
+                               },
+                               .iv_size = {
+                                       .min = 0,
+                                       .max = 0,
+                                       .increment = 0
+                               }
+                       }, },
+               }, }
+       },
 
        RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
 };