Skip to content

Commit

Permalink
crypto/qat: fix GEN4 AEAD job in raw data path
Browse files Browse the repository at this point in the history
[ upstream commit 3cb8f53 ]

This patch fix the cipher params configuration in AEAD job if
QAT GEN4 unified cipher slice(UCS) enabled.

Fixes: 328d690 ("crypto/qat: update raw data path")

Signed-off-by: Kai Ji <kai.ji@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
  • Loading branch information
KaiJiIntel authored and kevintraynor committed Feb 21, 2022
1 parent 98ec926 commit 6f9d8df
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions drivers/crypto/qat/qat_sym_hw_dp.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6f9d8df

Please sign in to comment.