crypto/scheduler: fix session backup
authorFan Zhang <roy.fan.zhang@intel.com>
Thu, 9 Feb 2017 18:46:21 +0000 (18:46 +0000)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Fri, 10 Feb 2017 15:06:04 +0000 (16:06 +0100)
Fixes the missed session backup during enqueue.

Fixes: 100e4f7e44ab ("crypto/scheduler: add round-robin mode")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
drivers/crypto/scheduler/scheduler_roundrobin.c

index 1f5448e..9545aa9 100644 (file)
@@ -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++;
        }