From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
To: yliu@fridaylinux.org
Cc: stable@dpdk.org, Pablo de Lara <pablo.de.lara.guarch@intel.com>
Subject: [dpdk-stable] [PATCH 1/5] crypto/qat: fix HMAC supported key sizes
Date: Wed, 16 Aug 2017 01:16:12 +0100 [thread overview]
Message-ID: <20170816001616.8036-2-pablo.de.lara.guarch@intel.com> (raw)
In-Reply-To: <20170816001616.8036-1-pablo.de.lara.guarch@intel.com>
[ backported from upstream commit 5668da1eb5897a96b672ac3b610bd3542e3e5cbe ]
For HMAC algorithms (MD5-HMAC, SHAx-HMAC), the supported
key sizes are not a fixed value, but a range between
1 and the block size.
Fixes: 26c2e4ad5ad4 ("cryptodev: add capabilities discovery")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
drivers/crypto/qat/qat_crypto.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index 0fe0b23..dd869d0 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -76,9 +76,9 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA1_HMAC,
.block_size = 64,
.key_size = {
- .min = 64,
+ .min = 1,
.max = 64,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 20,
@@ -97,9 +97,9 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA224_HMAC,
.block_size = 64,
.key_size = {
- .min = 64,
+ .min = 1,
.max = 64,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 28,
@@ -118,9 +118,9 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA256_HMAC,
.block_size = 64,
.key_size = {
- .min = 64,
+ .min = 1,
.max = 64,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 32,
@@ -139,9 +139,9 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA384_HMAC,
.block_size = 64,
.key_size = {
- .min = 128,
+ .min = 1,
.max = 128,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 48,
@@ -160,9 +160,9 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA512_HMAC,
.block_size = 128,
.key_size = {
- .min = 128,
+ .min = 1,
.max = 128,
- .increment = 0
+ .increment = 128
},
.digest_size = {
.min = 64,
@@ -181,9 +181,9 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_MD5_HMAC,
.block_size = 64,
.key_size = {
- .min = 8,
+ .min = 1,
.max = 64,
- .increment = 8
+ .increment = 1
},
.digest_size = {
.min = 16,
--
2.9.4
next prev parent reply other threads:[~2017-08-16 8:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 0:16 [dpdk-stable] [PATCH 0/5] Backported crypto patches to DPDK 16.11 Pablo de Lara
2017-08-16 0:16 ` Pablo de Lara [this message]
2017-08-16 0:16 ` [dpdk-stable] [PATCH 2/5] crypto/qat: fix SHA384-HMAC block size Pablo de Lara
2017-08-16 0:16 ` [dpdk-stable] [PATCH 3/5] doc: remove incorrect limitation on AESNI-MB PMD Pablo de Lara
2017-08-16 0:16 ` [dpdk-stable] [PATCH 4/5] doc: remove incorrect limitation on QAT PMD Pablo de Lara
2017-08-16 0:16 ` [dpdk-stable] [PATCH 5/5] test/crypto: fix wrong AAD setting Pablo de Lara
2017-08-16 8:23 ` [dpdk-stable] [PATCH 0/5] Backported crypto patches to DPDK 16.11 Yuanhan Liu
2017-08-16 8:25 ` De Lara Guarch, Pablo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170816001616.8036-2-pablo.de.lara.guarch@intel.com \
--to=pablo.de.lara.guarch@intel.com \
--cc=stable@dpdk.org \
--cc=yliu@fridaylinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).