From: Adam Dybkowski Date: Mon, 10 May 2021 10:20:11 +0000 (+0100) Subject: crypto/qat: fix null authentication request X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5cce3bd6b2fc9e272a8defc7b8971a96232d4529;p=dpdk.git crypto/qat: fix null authentication request This patch fixes the NULL auth generation case where the request shouldn't contain the authentication result address. Allows to run ipsec_autotest with a QAT device. Fixes: 65beb9abca6d ("crypto/qat: fix null auth when using VFIO") Cc: stable@dpdk.org Signed-off-by: Adam Dybkowski Acked-by: Fan Zhang --- diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c index a1f5676c04..9415ec7d32 100644 --- a/drivers/crypto/qat/qat_sym.c +++ b/drivers/crypto/qat/qat_sym.c @@ -399,8 +399,10 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg, } min_ofs = auth_ofs; - auth_param->auth_res_addr = - op->sym->auth.digest.phys_addr; + if (ctx->qat_hash_alg != ICP_QAT_HW_AUTH_ALGO_NULL || + ctx->auth_op == ICP_QAT_HW_AUTH_VERIFY) + auth_param->auth_res_addr = + op->sym->auth.digest.phys_addr; }