DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] enable ioat test to run multiple times
@ 2019-10-10 12:36 Ciara Power
  2019-10-10 12:36 ` [dpdk-dev] [PATCH 1/2] raw/ioat: fix rawdev state to stopped after test Ciara Power
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ciara Power @ 2019-10-10 12:36 UTC (permalink / raw)
  To: bruce.richardson; +Cc: dev, Ciara Power

This patchset enables the ioat_rawdev_autotest to be run multiple times. To
make this possible, changes were made to stop the rawdev on completion of
the test, and to ensure the initial ring size is as expected.

Ciara Power (2):
  raw/ioat: fix rawdev state to stopped after test
  raw/ioat: fix initial ring size check

 drivers/raw/ioat/ioat_rawdev_test.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

-- 
2.17.1


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

* [dpdk-dev] [PATCH 1/2] raw/ioat: fix rawdev state to stopped after test
  2019-10-10 12:36 [dpdk-dev] [PATCH 0/2] enable ioat test to run multiple times Ciara Power
@ 2019-10-10 12:36 ` Ciara Power
  2019-10-10 12:40   ` Bruce Richardson
  2019-10-10 12:36 ` [dpdk-dev] [PATCH 2/2] raw/ioat: fix initial ring size check Ciara Power
  2019-10-27 13:22 ` [dpdk-dev] [PATCH 0/2] enable ioat test to run multiple times David Marchand
  2 siblings, 1 reply; 6+ messages in thread
From: Ciara Power @ 2019-10-10 12:36 UTC (permalink / raw)
  To: bruce.richardson; +Cc: dev, Ciara Power

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(+)

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);
-- 
2.17.1


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

* [dpdk-dev] [PATCH 2/2] raw/ioat: fix initial ring size check
  2019-10-10 12:36 [dpdk-dev] [PATCH 0/2] enable ioat test to run multiple times Ciara Power
  2019-10-10 12:36 ` [dpdk-dev] [PATCH 1/2] raw/ioat: fix rawdev state to stopped after test Ciara Power
@ 2019-10-10 12:36 ` Ciara Power
  2019-10-10 12:40   ` Bruce Richardson
  2019-10-27 13:22 ` [dpdk-dev] [PATCH 0/2] enable ioat test to run multiple times David Marchand
  2 siblings, 1 reply; 6+ messages in thread
From: Ciara Power @ 2019-10-10 12:36 UTC (permalink / raw)
  To: bruce.richardson; +Cc: dev, Ciara Power

When running the ioat_rawdev_autotest, the ring size was initially required
to be 0. This prevented the test being run multiple times, as the ring size
is modified to a non-zero value when running the first test.

A global variable is now used to track the expected ring size, and is used
in the initial value check.  This enables the test to be run more than
once.

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

Reported-by: Yinan Wang <yinan.wang@intel.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 drivers/raw/ioat/ioat_rawdev_test.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/raw/ioat/ioat_rawdev_test.c b/drivers/raw/ioat/ioat_rawdev_test.c
index 6aad79486..e99f97ec4 100644
--- a/drivers/raw/ioat/ioat_rawdev_test.c
+++ b/drivers/raw/ioat/ioat_rawdev_test.c
@@ -11,6 +11,7 @@
 int ioat_rawdev_test(uint16_t dev_id); /* pre-define to keep compiler happy */
 
 static struct rte_mempool *pool;
+static unsigned short expected_ring_size;
 
 static int
 test_enqueue_copies(int dev_id)
@@ -148,9 +149,9 @@ ioat_rawdev_test(uint16_t dev_id)
 	unsigned int i;
 
 	rte_rawdev_info_get(dev_id, &info);
-	if (p.ring_size != 0) {
-		printf("Error, initial ring size is non-zero (%d)\n",
-				(int)p.ring_size);
+	if (p.ring_size != expected_ring_size) {
+		printf("Error, initial ring size is not as expected (Actual: %d, Expected: %d)\n",
+				(int)p.ring_size, expected_ring_size);
 		return -1;
 	}
 
@@ -165,6 +166,7 @@ ioat_rawdev_test(uint16_t dev_id)
 				IOAT_TEST_RINGSIZE, (int)p.ring_size);
 		return -1;
 	}
+	expected_ring_size = p.ring_size;
 
 	if (rte_rawdev_start(dev_id) != 0) {
 		printf("Error with rte_rawdev_start()\n");
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH 2/2] raw/ioat: fix initial ring size check
  2019-10-10 12:36 ` [dpdk-dev] [PATCH 2/2] raw/ioat: fix initial ring size check Ciara Power
@ 2019-10-10 12:40   ` Bruce Richardson
  0 siblings, 0 replies; 6+ messages in thread
From: Bruce Richardson @ 2019-10-10 12:40 UTC (permalink / raw)
  To: Ciara Power; +Cc: dev

On Thu, Oct 10, 2019 at 01:36:03PM +0100, Ciara Power wrote:
> When running the ioat_rawdev_autotest, the ring size was initially required
> to be 0. This prevented the test being run multiple times, as the ring size
> is modified to a non-zero value when running the first test.
> 
> A global variable is now used to track the expected ring size, and is used
> in the initial value check.  This enables the test to be run more than
> once.
> 
> Fixes: 849470d522ed ("raw/ioat: add configure, start and stop functions")
> Cc: bruce.richardson@intel.com
> 
> Reported-by: Yinan Wang <yinan.wang@intel.com>
> Signed-off-by: Ciara Power <ciara.power@intel.com>

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

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

* Re: [dpdk-dev] [PATCH 1/2] raw/ioat: fix rawdev state to stopped after test
  2019-10-10 12:36 ` [dpdk-dev] [PATCH 1/2] raw/ioat: fix rawdev state to stopped after test Ciara Power
@ 2019-10-10 12:40   ` Bruce Richardson
  0 siblings, 0 replies; 6+ messages in thread
From: Bruce Richardson @ 2019-10-10 12:40 UTC (permalink / raw)
  To: Ciara Power; +Cc: dev

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>

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

* Re: [dpdk-dev] [PATCH 0/2] enable ioat test to run multiple times
  2019-10-10 12:36 [dpdk-dev] [PATCH 0/2] enable ioat test to run multiple times Ciara Power
  2019-10-10 12:36 ` [dpdk-dev] [PATCH 1/2] raw/ioat: fix rawdev state to stopped after test Ciara Power
  2019-10-10 12:36 ` [dpdk-dev] [PATCH 2/2] raw/ioat: fix initial ring size check Ciara Power
@ 2019-10-27 13:22 ` David Marchand
  2 siblings, 0 replies; 6+ messages in thread
From: David Marchand @ 2019-10-27 13:22 UTC (permalink / raw)
  To: Ciara Power; +Cc: Bruce Richardson, dev

On Thu, Oct 10, 2019 at 2:38 PM Ciara Power <ciara.power@intel.com> wrote:
>
> This patchset enables the ioat_rawdev_autotest to be run multiple times. To
> make this possible, changes were made to stop the rawdev on completion of
> the test, and to ensure the initial ring size is as expected.
>
> Ciara Power (2):
>   raw/ioat: fix rawdev state to stopped after test
>   raw/ioat: fix initial ring size check
>
>  drivers/raw/ioat/ioat_rawdev_test.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)

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

Applied, thanks.


-- 
David Marchand


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

end of thread, other threads:[~2019-10-27 13:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10 12:36 [dpdk-dev] [PATCH 0/2] enable ioat test to run multiple times Ciara Power
2019-10-10 12:36 ` [dpdk-dev] [PATCH 1/2] raw/ioat: fix rawdev state to stopped after test Ciara Power
2019-10-10 12:40   ` Bruce Richardson
2019-10-10 12:36 ` [dpdk-dev] [PATCH 2/2] raw/ioat: fix initial ring size check Ciara Power
2019-10-10 12:40   ` Bruce Richardson
2019-10-27 13:22 ` [dpdk-dev] [PATCH 0/2] enable ioat test to run multiple times David Marchand

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).