From 354da52e929163dc1e46ddf33975581bd0bacd2c Mon Sep 17 00:00:00 2001 From: Fan Zhang Date: Thu, 9 Feb 2017 18:46:21 +0000 Subject: [PATCH] crypto/scheduler: fix session backup Fixes the missed session backup during enqueue. Fixes: 100e4f7e44ab ("crypto/scheduler: add round-robin mode") Signed-off-by: Fan Zhang Acked-by: Pablo de Lara --- drivers/crypto/scheduler/scheduler_roundrobin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/scheduler/scheduler_roundrobin.c b/drivers/crypto/scheduler/scheduler_roundrobin.c index 1f5448e900..9545aa9e53 100644 --- a/drivers/crypto/scheduler/scheduler_roundrobin.c +++ b/drivers/crypto/scheduler/scheduler_roundrobin.c @@ -90,6 +90,7 @@ schedule_enqueue(void *qp_ctx, struct rte_crypto_op **ops, uint16_t nb_ops) for (; i < nb_ops; i++) { sess0 = (struct scheduler_session *) ops[i]->sym->session->_private; + sessions[i] = ops[i]->sym->session; ops[i]->sym->session = sess0->sessions[slave_idx]; } @@ -168,6 +169,7 @@ schedule_enqueue_ordering(void *qp_ctx, struct rte_crypto_op **ops, for (; i < nb_ops; i++) { sess0 = (struct scheduler_session *) ops[i]->sym->session->_private; + sessions[i] = ops[i]->sym->session; ops[i]->sym->session = sess0->sessions[slave_idx]; ops[i]->sym->m_src->seqn = gen_qp_ctx->seqn++; } -- 2.20.1