crypto/octeontx2: fix lookaside IPsec capabilities
authorTejasree Kondoj <ktejasree@marvell.com>
Tue, 28 Sep 2021 10:24:30 +0000 (15:54 +0530)
committerAkhil Goyal <gakhil@marvell.com>
Fri, 8 Oct 2021 19:31:07 +0000 (21:31 +0200)
Adding cbc, sha1-hmac and sha256-hmac to lookaside IPsec capabilities.

Fixes: 8f685ec2d545 ("crypto/octeontx2: support AES-CBC SHA1-HMAC")
Fixes: 61baeec4682c ("crypto/octeontx2: support AES-CBC SHA256-128-HMAC")
Cc: stable@dpdk.org
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
drivers/crypto/octeontx2/otx2_cryptodev_capabilities.c

index 80f3729..ba3fbbb 100644 (file)
@@ -767,6 +767,69 @@ static const struct rte_cryptodev_capabilities sec_caps_aes[] = {
                        }, }
                }, }
        },
+       {       /* AES CBC */
+               .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
+               {.sym = {
+                       .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
+                       {.cipher = {
+                               .algo = RTE_CRYPTO_CIPHER_AES_CBC,
+                               .block_size = 16,
+                               .key_size = {
+                                       .min = 16,
+                                       .max = 32,
+                                       .increment = 8
+                               },
+                               .iv_size = {
+                                       .min = 16,
+                                       .max = 16,
+                                       .increment = 0
+                               }
+                       }, }
+               }, }
+       },
+};
+
+static const struct rte_cryptodev_capabilities sec_caps_sha1_sha2[] = {
+       {       /* SHA1 HMAC */
+               .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
+               {.sym = {
+                       .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
+                       {.auth = {
+                               .algo = RTE_CRYPTO_AUTH_SHA1_HMAC,
+                               .block_size = 64,
+                               .key_size = {
+                                       .min = 1,
+                                       .max = 1024,
+                                       .increment = 1
+                               },
+                               .digest_size = {
+                                       .min = 12,
+                                       .max = 20,
+                                       .increment = 8
+                               },
+                       }, }
+               }, }
+       },
+       {       /* SHA256 HMAC */
+               .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
+               {.sym = {
+                       .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
+                       {.auth = {
+                               .algo = RTE_CRYPTO_AUTH_SHA256_HMAC,
+                               .block_size = 64,
+                               .key_size = {
+                                       .min = 1,
+                                       .max = 1024,
+                                       .increment = 1
+                               },
+                               .digest_size = {
+                                       .min = 16,
+                                       .max = 32,
+                                       .increment = 16
+                               },
+                       }, }
+               }, }
+       },
 };
 
 static const struct rte_security_capability
@@ -849,6 +912,7 @@ void
 otx2_crypto_sec_capabilities_init(union cpt_eng_caps *hw_caps)
 {
        SEC_CAPS_ADD(hw_caps, aes);
+       SEC_CAPS_ADD(hw_caps, sha1_sha2);
 
        sec_caps_add(caps_end, RTE_DIM(caps_end));
 }