From: Kai Ji Date: Fri, 21 Jan 2022 10:38:30 +0000 (+0000) Subject: crypto/qat: fix GEN4 AEAD job in raw data path X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3cb8f5347735eead44945ff5dbbdaf1069475d82;p=dpdk.git crypto/qat: fix GEN4 AEAD job in raw data path 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: stable@dpdk.org Signed-off-by: Kai Ji Acked-by: Fan Zhang --- 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; }