patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v2] crypto/scheduler: fix session free
       [not found] <1491234435-112340-1-git-send-email-roy.fan.zhang@intel.com>
@ 2017-04-03 16:37 ` Fan Zhang
  2017-04-04  9:31   ` [dpdk-stable] [PATCH v3] " Fan Zhang
  0 siblings, 1 reply; 3+ messages in thread
From: Fan Zhang @ 2017-04-03 16:37 UTC (permalink / raw)
  To: dev; +Cc: pablo.de.lara.guarch, stable

This patch fixes the incorrection slave session free operation.

Fixes: 57523e682bb7 ("crypto/scheduler: register operation functions")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---

v2:
- Remove unnecessary session set line.

 drivers/crypto/scheduler/scheduler_pmd_ops.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index f02506c..cd8c6a8 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -433,9 +433,10 @@ config_slave_sess(struct scheduler_ctx *sched_ctx,
 			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]);
+			if (!sess->sessions[i])
+				return -1;
 		} else {
 			if (!create)
 				continue;
@@ -443,10 +444,6 @@ config_slave_sess(struct scheduler_ctx *sched_ctx,
 			sess->sessions[i] =
 					rte_cryptodev_sym_session_create(
 							slave->dev_id, xform);
-			if (!sess->sessions[i]) {
-				config_slave_sess(sched_ctx, NULL, sess, 0);
-				return -1;
-			}
 		}
 	}
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dpdk-stable] [PATCH v3] crypto/scheduler: fix session free
  2017-04-03 16:37 ` [dpdk-stable] [PATCH v2] crypto/scheduler: fix session free Fan Zhang
@ 2017-04-04  9:31   ` Fan Zhang
  2017-04-04 15:27     ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 3+ messages in thread
From: Fan Zhang @ 2017-04-04  9:31 UTC (permalink / raw)
  To: dev; +Cc: pablo.de.lara.guarch, stable

This patch fixes the incorrection slave session free operation.

Fixes: 57523e682bb7 ("crypto/scheduler: register operation functions")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---

v3:
- Fixed incorrect removal in v2

v2:
- Removed unnecessary session set line.

 drivers/crypto/scheduler/scheduler_pmd_ops.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index f02506c..a13de46 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -433,9 +433,8 @@ config_slave_sess(struct scheduler_ctx *sched_ctx,
 			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;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH v3] crypto/scheduler: fix session free
  2017-04-04  9:31   ` [dpdk-stable] [PATCH v3] " Fan Zhang
@ 2017-04-04 15:27     ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 3+ messages in thread
From: De Lara Guarch, Pablo @ 2017-04-04 15:27 UTC (permalink / raw)
  To: Zhang, Roy Fan, dev; +Cc: stable



> -----Original Message-----
> From: Zhang, Roy Fan
> Sent: Tuesday, April 04, 2017 10:31 AM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo; stable@dpdk.org
> Subject: [PATCH v3] 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 <roy.fan.zhang@intel.com>
> ---

Acked and applied to dpdk-next-crypto.

Thanks,
Pablo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-04 15:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1491234435-112340-1-git-send-email-roy.fan.zhang@intel.com>
2017-04-03 16:37 ` [dpdk-stable] [PATCH v2] crypto/scheduler: fix session free Fan Zhang
2017-04-04  9:31   ` [dpdk-stable] [PATCH v3] " Fan Zhang
2017-04-04 15:27     ` De Lara Guarch, Pablo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).