crypto/mvsam: fix capabilities
authorMichael Shamis <michaelsh@marvell.com>
Thu, 1 Jul 2021 06:58:53 +0000 (09:58 +0300)
committerAkhil Goyal <gakhil@marvell.com>
Wed, 7 Jul 2021 19:28:39 +0000 (21:28 +0200)
Increased AAD max size up to 64B and allowed AAD increment step
1B according to EIP197 token HW limitation.
In addition, some capabilities were found incorrect due to
running FIPS tests. The patch fix the capabilities.

Fixes: 8a61c83af2f ("crypto/mrvl: add mrvl crypto driver")
Fixes: 2c22aa4f8f6 ("crypto/mvsam: update hash digest sizes")
Fixes: a84226fc055 ("crypto/mvsam: support HMAC SHA224")
Cc: stable@dpdk.org
Signed-off-by: Michael Shamis <michaelsh@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
Tested-by: Liron Himi <lironh@marvell.com>
drivers/crypto/mvsam/rte_mrvl_pmd_ops.c

index c61bdca..527ddef 100644 (file)
@@ -111,7 +111,7 @@ static const struct rte_cryptodev_capabilities
                                        .increment = 1
                                },
                                .digest_size = {
-                                       .min = 28,
+                                       .min = 12,
                                        .max = 28,
                                        .increment = 0
                                },
@@ -232,7 +232,7 @@ static const struct rte_cryptodev_capabilities
                                },
                                .digest_size = {
                                        .min = 12,
-                                       .max = 48,
+                                       .max = 64,
                                        .increment = 4
                                },
                        }, }
@@ -252,7 +252,7 @@ static const struct rte_cryptodev_capabilities
                                },
                                .digest_size = {
                                        .min = 12,
-                                       .max = 48,
+                                       .max = 64,
                                        .increment = 0
                                },
                        }, }
@@ -336,9 +336,9 @@ static const struct rte_cryptodev_capabilities
                                        .increment = 0
                                },
                                .aad_size = {
-                                       .min = 8,
-                                       .max = 12,
-                                       .increment = 4
+                                       .min = 0,
+                                       .max = 64,
+                                       .increment = 1
                                },
                                .iv_size = {
                                        .min = 12,