[dpdk-dev] cryptodev: fix device stop function

Message ID 1497429766-117636-1-git-send-email-kirill.rybalchenko@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Pablo de Lara Guarch
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Rybalchenko, Kirill June 14, 2017, 8:42 a.m. UTC
  Flag dev_started should be cleared after dev_stop() function call
because the flag is checked inside the dev_stop() function.

Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto devices")
Cc: stable@dpdk.org

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
---
 lib/librte_cryptodev/rte_cryptodev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

De Lara Guarch, Pablo June 24, 2017, 9:31 a.m. UTC | #1
> -----Original Message-----
> From: stable [mailto:stable-bounces@dpdk.org] On Behalf Of Kirill Rybalchenko
> Sent: Wednesday, June 14, 2017 9:43 AM
> To: Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; Rybalchenko, Kirill <kirill.rybalchenko@intel.com>;
> stable@dpdk.org
> Subject: [dpdk-stable] [PATCH] cryptodev: fix device stop function
> 
> Flag dev_started should be cleared after dev_stop() function call because the
> flag is checked inside the dev_stop() function.
> 
> Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto
> devices")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
  
De Lara Guarch, Pablo June 24, 2017, 10:19 a.m. UTC | #2
> -----Original Message-----
> From: stable [mailto:stable-bounces@dpdk.org] On Behalf Of De Lara Guarch,
> Pablo
> Sent: Saturday, June 24, 2017 10:32 AM
> To: Rybalchenko, Kirill <kirill.rybalchenko@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>
> Cc: dev@dpdk.org; Rybalchenko, Kirill <kirill.rybalchenko@intel.com>;
> stable@dpdk.org
> Subject: Re: [dpdk-stable] [PATCH] cryptodev: fix device stop function
> 
> 
> 
> > -----Original Message-----
> > From: stable [mailto:stable-bounces@dpdk.org] On Behalf Of Kirill
> > Rybalchenko
> > Sent: Wednesday, June 14, 2017 9:43 AM
> > To: Doherty, Declan <declan.doherty@intel.com>
> > Cc: dev@dpdk.org; Rybalchenko, Kirill <kirill.rybalchenko@intel.com>;
> > stable@dpdk.org
> > Subject: [dpdk-stable] [PATCH] cryptodev: fix device stop function
> >
> > Flag dev_started should be cleared after dev_stop() function call
> > because the flag is checked inside the dev_stop() function.
> >
> > Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for
> > crypto
> > devices")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
> 
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied to dpdk-next-crypto.
Thanks,
Pablo
  

Patch

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index b65cd9c..5aa2b8b 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1032,8 +1032,8 @@  rte_cryptodev_stop(uint8_t dev_id)
 		return;
 	}
 
-	dev->data->dev_started = 0;
 	(*dev->dev_ops->dev_stop)(dev);
+	dev->data->dev_started = 0;
 }
 
 int