[dpdk-dev] crypto/armv8: fix HMAC supported digest sizes

Message ID 1527590736-23897-1-git-send-email-anoob.joseph@caviumnetworks.com (mailing list archive)
State Accepted, archived
Delegated to: Pablo de Lara Guarch
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Anoob Joseph May 29, 2018, 10:45 a.m. UTC
  For HMAC algorithms (SHAx-HMAC), the supported digest sizes are not a
fixed value, but a range between 1 and the maximum digest size for those
algorithms.

Fixes: 0f89def76127 ("crypto/armv8: fix HMAC supported key sizes")
Cc: stable@dpdk.org

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
---
 drivers/crypto/armv8/rte_armv8_pmd_ops.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Comments

Akhil Goyal May 29, 2018, 11:28 a.m. UTC | #1
On 5/29/2018 4:15 PM, Anoob Joseph wrote:
> For HMAC algorithms (SHAx-HMAC), the supported digest sizes are not a
> fixed value, but a range between 1 and the maximum digest size for those
> algorithms.
>
> Fixes: 0f89def76127 ("crypto/armv8: fix HMAC supported key sizes")
> Cc: stable@dpdk.org
>
> Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
> Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
> ---
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
  
Thomas Monjalon May 30, 2018, 7:21 p.m. UTC | #2
29/05/2018 13:28, Akhil Goyal:
> On 5/29/2018 4:15 PM, Anoob Joseph wrote:
> > For HMAC algorithms (SHAx-HMAC), the supported digest sizes are not a
> > fixed value, but a range between 1 and the maximum digest size for those
> > algorithms.
> >
> > Fixes: 0f89def76127 ("crypto/armv8: fix HMAC supported key sizes")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
> > Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
> > ---
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

Applied, thanks
  

Patch

diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index 3817ad7..c64aef0 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -27,9 +27,9 @@  static const struct rte_cryptodev_capabilities
 						.increment = 1
 					},
 					.digest_size = {
-						.min = 20,
+						.min = 1,
 						.max = 20,
-						.increment = 0
+						.increment = 1
 					},
 					.iv_size = { 0 }
 				}, }
@@ -48,9 +48,9 @@  static const struct rte_cryptodev_capabilities
 						.increment = 1
 					},
 					.digest_size = {
-						.min = 32,
+						.min = 1,
 						.max = 32,
-						.increment = 0
+						.increment = 1
 					},
 					.iv_size = { 0 }
 				}, }