From: Fan Zhang Date: Thu, 9 Feb 2017 18:46:21 +0000 (+0000) Subject: crypto/scheduler: fix session backup X-Git-Tag: spdx-start~4499 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=354da52e929163dc1e46ddf33975581bd0bacd2c;p=dpdk.git 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 --- 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++; }