From: Fan Zhang Date: Tue, 4 Apr 2017 09:31:08 +0000 (+0100) Subject: crypto/scheduler: fix session free X-Git-Tag: spdx-start~3707 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=44dcd7f5fa7515fcddaff1a1793f538b20a5ebf0;p=dpdk.git crypto/scheduler: fix session free This patch fixes the incorrection slave session free operation. Fixes: 57523e682bb7 ("crypto/scheduler: register operation functions") Signed-off-by: Fan Zhang Acked-by: Pablo de Lara --- diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c index f02506cdae..34e0cc921d 100644 --- a/drivers/crypto/scheduler/scheduler_pmd_ops.c +++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c @@ -426,16 +426,13 @@ config_slave_sess(struct scheduler_ctx *sched_ctx, for (i = 0; i < sched_ctx->nb_slaves; i++) { struct scheduler_slave *slave = &sched_ctx->slaves[i]; - struct rte_cryptodev *dev = - rte_cryptodev_pmd_get_dev(slave->dev_id); if (sess->sessions[i]) { if (create) continue; /* !create */ - (*dev->dev_ops->session_clear)(dev, - (void *)sess->sessions[i]); - sess->sessions[i] = NULL; + sess->sessions[i] = rte_cryptodev_sym_session_free( + slave->dev_id, sess->sessions[i]); } else { if (!create) continue;