cryptodev: fix device stop function
authorKirill Rybalchenko <kirill.rybalchenko@intel.com>
Wed, 14 Jun 2017 08:42:46 +0000 (09:42 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 28 Jun 2017 17:59:22 +0000 (19:59 +0200)
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>
lib/librte_cryptodev/rte_cryptodev.c

index 3d118b5..a466ed7 100644 (file)
@@ -781,8 +781,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