[2/2] crypto/scheduler: fix op session in pkt size distr mode

Message ID 20221025141429.3463350-2-ciara.power@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series [1/2] app/test-crypto-perf: fix number of scheduler sessions |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS

Commit Message

Power, Ciara Oct. 25, 2022, 2:14 p.m. UTC
  The index for sess_ctx was incorrect when setting the op session.

Fixes: 6812b9bf470e ("crypto/scheduler: use unified session")

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 drivers/crypto/scheduler/scheduler_pkt_size_distr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/crypto/scheduler/scheduler_pkt_size_distr.c b/drivers/crypto/scheduler/scheduler_pkt_size_distr.c
index 396cc3723d..41f05e6a47 100644
--- a/drivers/crypto/scheduler/scheduler_pkt_size_distr.c
+++ b/drivers/crypto/scheduler/scheduler_pkt_size_distr.c
@@ -148,7 +148,7 @@  schedule_enqueue(void *qp, struct rte_crypto_op **ops, uint16_t nb_ops)
 		target[3] = !(job_len[3] & psd_qp_ctx->threshold);
 		if (ops[i + 3]->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
 			ops[i + 3]->sym->session =
-				sess_ctx[1]->worker_sess[target[3]];
+				sess_ctx[3]->worker_sess[target[3]];
 		p_enq_op = &enq_ops[target[3]];
 
 		if (p_enq_op->pos + in_flight_ops[p_enq_op->worker_idx] ==