DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] crypto/qat: fix NULL authentication request
@ 2021-05-10 10:20 Adam Dybkowski
  2021-05-10 11:41 ` Zhang, Roy Fan
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Dybkowski @ 2021-05-10 10:20 UTC (permalink / raw)
  To: dev, roy.fan.zhang, arkadiuszx.kusztal, gakhil; +Cc: Adam Dybkowski

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")

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
---
 drivers/crypto/qat/qat_sym.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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;
 
 	}
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-12 16:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10 10:20 [dpdk-dev] [PATCH] crypto/qat: fix NULL authentication request Adam Dybkowski
2021-05-10 11:41 ` Zhang, Roy Fan
2021-05-12 14:16   ` Iremonger, Bernard
2021-05-12 16:08     ` Akhil Goyal

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).