test: skip some subtests in no-huge mode
[dpdk.git] / drivers / crypto / octeontx2 / otx2_cryptodev_capabilities.c
index 3a70470..3eb3d85 100644 (file)
@@ -6,7 +6,8 @@
 
 #include "otx2_cryptodev_capabilities.h"
 
-static const struct rte_cryptodev_capabilities otx2_cpt_sym_capabilities[] = {
+static const struct
+rte_cryptodev_capabilities otx2_cpt_capabilities[] = {
        /* Symmetric capabilities */
        {       /* NULL (AUTH) */
                .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
@@ -141,9 +142,9 @@ static const struct rte_cryptodev_capabilities otx2_cpt_sym_capabilities[] = {
                                .algo = RTE_CRYPTO_AUTH_SHA1_HMAC,
                                .block_size = 64,
                                .key_size = {
-                                       .min = 64,
-                                       .max = 64,
-                                       .increment = 0
+                                       .min = 1,
+                                       .max = 1024,
+                                       .increment = 1
                                },
                                .digest_size = {
                                        .min = 20,
@@ -181,9 +182,9 @@ static const struct rte_cryptodev_capabilities otx2_cpt_sym_capabilities[] = {
                                .algo = RTE_CRYPTO_AUTH_SHA224_HMAC,
                                .block_size = 64,
                                        .key_size = {
-                                       .min = 64,
-                                       .max = 64,
-                                       .increment = 0
+                                       .min = 1,
+                                       .max = 1024,
+                                       .increment = 1
                                },
                                .digest_size = {
                                        .min = 28,
@@ -221,9 +222,9 @@ static const struct rte_cryptodev_capabilities otx2_cpt_sym_capabilities[] = {
                                .algo = RTE_CRYPTO_AUTH_SHA256_HMAC,
                                .block_size = 64,
                                .key_size = {
-                                       .min = 64,
-                                       .max = 64,
-                                       .increment = 0
+                                       .min = 1,
+                                       .max = 1024,
+                                       .increment = 1
                                },
                                .digest_size = {
                                        .min = 32,
@@ -261,9 +262,9 @@ static const struct rte_cryptodev_capabilities otx2_cpt_sym_capabilities[] = {
                                .algo = RTE_CRYPTO_AUTH_SHA384_HMAC,
                                .block_size = 64,
                                .key_size = {
-                                       .min = 64,
-                                       .max = 64,
-                                       .increment = 0
+                                       .min = 1,
+                                       .max = 1024,
+                                       .increment = 1
                                },
                                .digest_size = {
                                        .min = 48,
@@ -301,9 +302,9 @@ static const struct rte_cryptodev_capabilities otx2_cpt_sym_capabilities[] = {
                                .algo = RTE_CRYPTO_AUTH_SHA512_HMAC,
                                .block_size = 128,
                                .key_size = {
-                                       .min = 64,
-                                       .max = 64,
-                                       .increment = 0
+                                       .min = 1,
+                                       .max = 1024,
+                                       .increment = 1
                                },
                                .digest_size = {
                                        .min = 64,
@@ -576,9 +577,9 @@ static const struct rte_cryptodev_capabilities otx2_cpt_sym_capabilities[] = {
                                        .increment = 8
                                },
                                .digest_size = {
-                                       .min = 8,
+                                       .min = 4,
                                        .max = 16,
-                                       .increment = 4
+                                       .increment = 1
                                },
                                .aad_size = {
                                        .min = 0,
@@ -594,11 +595,66 @@ static const struct rte_cryptodev_capabilities otx2_cpt_sym_capabilities[] = {
                }, }
        },
        /* End of symmetric capabilities */
+
+       /* Asymmetric capabilities */
+       {       /* RSA */
+               .op = RTE_CRYPTO_OP_TYPE_ASYMMETRIC,
+               {.asym = {
+                       .xform_capa = {
+                               .xform_type = RTE_CRYPTO_ASYM_XFORM_RSA,
+                               .op_types = ((1 << RTE_CRYPTO_ASYM_OP_SIGN) |
+                                       (1 << RTE_CRYPTO_ASYM_OP_VERIFY) |
+                                       (1 << RTE_CRYPTO_ASYM_OP_ENCRYPT) |
+                                       (1 << RTE_CRYPTO_ASYM_OP_DECRYPT)),
+                               {.modlen = {
+                                       .min = 17,
+                                       .max = 1024,
+                                       .increment = 1
+                               }, }
+                       }
+               }, }
+       },
+       {       /* MOD_EXP */
+               .op = RTE_CRYPTO_OP_TYPE_ASYMMETRIC,
+               {.asym = {
+                       .xform_capa = {
+                               .xform_type = RTE_CRYPTO_ASYM_XFORM_MODEX,
+                               .op_types = 0,
+                               {.modlen = {
+                                       .min = 17,
+                                       .max = 1024,
+                                       .increment = 1
+                               }, }
+                       }
+               }, }
+       },
+       {       /* ECDSA */
+               .op = RTE_CRYPTO_OP_TYPE_ASYMMETRIC,
+               {.asym = {
+                       .xform_capa = {
+                               .xform_type = RTE_CRYPTO_ASYM_XFORM_ECDSA,
+                               .op_types = ((1 << RTE_CRYPTO_ASYM_OP_SIGN) |
+                                       (1 << RTE_CRYPTO_ASYM_OP_VERIFY)),
+                               }
+                       },
+               }
+       },
+       {       /* ECPM */
+               .op = RTE_CRYPTO_OP_TYPE_ASYMMETRIC,
+               {.asym = {
+                       .xform_capa = {
+                               .xform_type = RTE_CRYPTO_ASYM_XFORM_ECPM,
+                               .op_types = 0
+                               }
+                       },
+               }
+       },
+       /* End of asymmetric capabilities */
        RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
 };
 
 const struct rte_cryptodev_capabilities *
 otx2_cpt_capabilities_get(void)
 {
-       return otx2_cpt_sym_capabilities;
+       return otx2_cpt_capabilities;
 }