This patch fix the session pointer passed in set_session()
when ctx has NULL build request pointer in multi-processes
scenario.

Fixes: fb3b9f492205 ("crypto/qat: rework burst data path")
Cc: sta...@dpdk.org

Signed-off-by: Kai Ji <kai...@intel.com>
---
 drivers/crypto/qat/qat_sym.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 54c3d59a51..fd2d9eed3b 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -85,7 +85,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
                        if (unlikely(ctx->build_request[proc_type] == NULL)) {
                                int ret =
                                qat_sym_gen_dev_ops[dev_gen].set_session(
-                                       (void *)cdev, (void *)sess);
+                                       (void *)cdev, (void *)ctx);
                                if (ret < 0) {
                                        op->status =
                                                
RTE_CRYPTO_OP_STATUS_INVALID_SESSION;
-- 
2.17.1

Reply via email to