[1/2] raw/ioat: fix rawdev state to stopped after test

Message ID 20191010123603.58007-2-ciara.power@intel.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series enable ioat test to run multiple times |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-compilation success Compile Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Power, Ciara Oct. 10, 2019, 12:36 p.m. UTC
  The ioat rawdev was initially started during the test, however was never
stopped. This would cause issues when running the test again, as the device
cannot be configured when in a running state.

The device is now stopped after the test has completed, or if the test is
terminated due to error.

Fixes: 849470d522ed ("raw/ioat: add configure, start and stop functions")
Cc: bruce.richardson@intel.com

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 drivers/raw/ioat/ioat_rawdev_test.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Bruce Richardson Oct. 10, 2019, 12:40 p.m. UTC | #1
On Thu, Oct 10, 2019 at 01:36:02PM +0100, Ciara Power wrote:
> The ioat rawdev was initially started during the test, however was never
> stopped. This would cause issues when running the test again, as the device
> cannot be configured when in a running state.
> 
> The device is now stopped after the test has completed, or if the test is
> terminated due to error.
> 
> Fixes: 849470d522ed ("raw/ioat: add configure, start and stop functions")
> Cc: bruce.richardson@intel.com
> 
> Signed-off-by: Ciara Power <ciara.power@intel.com>

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  

Patch

diff --git a/drivers/raw/ioat/ioat_rawdev_test.c b/drivers/raw/ioat/ioat_rawdev_test.c
index f6c7dbb80..6aad79486 100644
--- a/drivers/raw/ioat/ioat_rawdev_test.c
+++ b/drivers/raw/ioat/ioat_rawdev_test.c
@@ -220,6 +220,7 @@  ioat_rawdev_test(uint16_t dev_id)
 	}
 	printf("\n");
 
+	rte_rawdev_stop(dev_id);
 	rte_mempool_free(pool);
 	free(snames);
 	free(stats);
@@ -227,6 +228,7 @@  ioat_rawdev_test(uint16_t dev_id)
 	return 0;
 
 err:
+	rte_rawdev_stop(dev_id);
 	rte_mempool_free(pool);
 	free(snames);
 	free(stats);