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
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")
Cc: stable@dpdk.org

Signed-off-by: Kai Ji <kai.ji@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
  • Loading branch information
KaiJiIntel authored and Akhil Goyal committed Feb 12, 2022
1 parent 4582f79 commit 3cb8f53
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions drivers/crypto/qat/qat_sym_hw_dp.c
Original file line number Diff line number Diff line change
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 3cb8f53

Please sign in to comment.