From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
To: dev@dpdk.org
Cc: gakhil@marvell.com, brian.dooley@intel.com,
Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>,
stable@dpdk.org
Subject: [PATCH] crypto/qat: fix incorrect sm3 state size
Date: Wed, 26 Feb 2025 09:30:19 +0000 [thread overview]
Message-ID: <20250226093019.1582450-1-arkadiuszx.kusztal@intel.com> (raw)
This commit fixes incorrectly set state size within
the QAT PMD.
Fixes: 75fd4bbc94ab ("crypto/qat: support SM3 hash algorithm")
Cc: stable@dpdk.org
Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
---
drivers/crypto/qat/qat_sym_session.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 9b26f8a89b..7f370f03fb 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -2473,7 +2473,8 @@ int qat_sym_cd_auth_set(struct qat_sym_session *cdesc,
qat_hash_get_block_size(cdesc->qat_hash_alg) >> 3;
auth_param->u2.inner_prefix_sz =
qat_hash_get_block_size(cdesc->qat_hash_alg);
- auth_param->hash_state_sz = digestsize;
+ auth_param->hash_state_sz = (hash_cd_ctrl->outer_prefix_sz +
+ auth_param->u2.inner_prefix_sz) >> 3;
if (qat_dev_gen == QAT_GEN4 || qat_dev_gen == QAT_GEN5 ||
qat_dev_gen == QAT_VQAT) {
ICP_QAT_FW_HASH_FLAG_MODE2_SET(
--
2.43.0
reply other threads:[~2025-02-26 9:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250226093019.1582450-1-arkadiuszx.kusztal@intel.com \
--to=arkadiuszx.kusztal@intel.com \
--cc=brian.dooley@intel.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=stable@dpdk.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).