From: Kai Ji <kai.ji@intel.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, Kai Ji <kai.ji@intel.com>, roy.fan.zhang@intel.com
Subject: [dpdk-dev v1] crypto/qat: fix QAT GEN4 AEAD job in raw data path
Date: Fri, 21 Jan 2022 10:38:30 +0000 [thread overview]
Message-ID: <20220121103830.14058-1-kai.ji@intel.com> (raw)
This patch fix the cipher params configuration in AEAD job if
QAT GEN4 unified cipher slice(UCS) enabled.
Fixes: 328d690d2f60 ("crypto/qat: update raw data path")
Cc: roy.fan.zhang@intel.com
Signed-off-by: Kai Ji <kai.ji@intel.com>
---
drivers/crypto/qat/qat_sym_hw_dp.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/qat/qat_sym_hw_dp.c b/drivers/crypto/qat/qat_sym_hw_dp.c
index 12825e448b..792ad2b213 100644
--- a/drivers/crypto/qat/qat_sym_hw_dp.c
+++ b/drivers/crypto/qat/qat_sym_hw_dp.c
@@ -533,8 +533,20 @@ enqueue_one_aead_job(struct qat_sym_session *ctx,
/* CPM 1.7 uses single pass to treat AEAD as cipher operation */
if (ctx->is_single_pass) {
enqueue_one_cipher_job(ctx, req, iv, ofs, data_len);
- cipher_param->spc_aad_addr = aad->iova;
- cipher_param->spc_auth_res_addr = digest->iova;
+
+ if (ctx->is_ucs) {
+ /* QAT GEN4 uses single pass to treat AEAD as cipher
+ * operation
+ */
+ struct icp_qat_fw_la_cipher_20_req_params *cipher_param_20 =
+ (void *)&req->serv_specif_rqpars;
+ cipher_param_20->spc_aad_addr = aad->iova;
+ cipher_param_20->spc_auth_res_addr = digest->iova;
+ } else {
+ cipher_param->spc_aad_addr = aad->iova;
+ cipher_param->spc_auth_res_addr = digest->iova;
+ }
+
return;
}
--
2.30.2
next reply other threads:[~2022-01-21 10:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-21 10:38 Kai Ji [this message]
2022-01-21 10:40 ` Zhang, Roy Fan
2022-02-08 21:30 ` Akhil Goyal
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=20220121103830.14058-1-kai.ji@intel.com \
--to=kai.ji@intel.com \
--cc=dev@dpdk.org \
--cc=roy.fan.zhang@intel.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).