DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Chengwen Feng <fengchengwen@huawei.com>,
	Kevin Laatz <kevin.laatz@intel.com>
Subject: [PATCH v2 4/4] test_dmadev: increase iterations of capacity test case
Date: Tue, 11 Jan 2022 13:41:05 +0000	[thread overview]
Message-ID: <20220111134105.1007191-5-bruce.richardson@intel.com> (raw)
In-Reply-To: <20220111134105.1007191-1-bruce.richardson@intel.com>

To ensure we catch any bugs in calculation due to wrap-around of the id
values, increase the number of iterations of the burst_capacity test.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/test_dmadev.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c
index b206db27ae..db5aff701c 100644
--- a/app/test/test_dmadev.c
+++ b/app/test/test_dmadev.c
@@ -686,10 +686,11 @@ test_burst_capacity(int16_t dev_id, uint16_t vchan)
 	/* to test capacity, we enqueue elements and check capacity is reduced
 	 * by one each time - rebaselining the expected value after each burst
 	 * as the capacity is only for a burst. We enqueue multiple bursts to
-	 * fill up half the ring, before emptying it again. We do this twice to
-	 * ensure that we get to test scenarios where we get ring wrap-around
+	 * fill up half the ring, before emptying it again. We do this multiple
+	 * times to ensure that we get to test scenarios where we get ring
+	 * wrap-around and wrap-around of the ids returned (at UINT16_MAX).
 	 */
-	for (iter = 0; iter < 2; iter++) {
+	for (iter = 0; iter < 2 * (((int)UINT16_MAX + 1) / ring_space); iter++) {
 		for (i = 0; i < (ring_space / (2 * CAP_TEST_BURST_SIZE)) + 1; i++) {
 			cap = rte_dma_burst_capacity(dev_id, vchan);
 
-- 
2.32.0


  parent reply	other threads:[~2022-01-11 13:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-20 17:05 [PATCH] dma/idxd: fix burst capacity calculation Bruce Richardson
2022-01-04 17:16 ` Kevin Laatz
2022-01-05  1:32   ` Hu, Jiayu
2022-01-10 13:09 ` Pai G, Sunil
2022-01-10 13:25   ` Bruce Richardson
2022-01-10 13:44     ` Pai G, Sunil
2022-01-10 16:18       ` Bruce Richardson
2022-01-11 13:41 ` [PATCH v2 0/4] fixes for dma/idxd Bruce Richardson
2022-01-11 13:41   ` [PATCH v2 1/4] dma/idxd: fix burst capacity calculation Bruce Richardson
2022-01-11 13:41   ` [PATCH v2 2/4] dma/idxd: fix paths to driver sysfs directory Bruce Richardson
2022-01-11 16:50     ` Kevin Laatz
2022-01-11 13:41   ` [PATCH v2 3/4] dma/idxd: fix wrap-around in burst capacity calculation Bruce Richardson
2022-01-11 13:45     ` Pai G, Sunil
2022-01-11 16:50     ` Kevin Laatz
2022-01-11 13:41   ` Bruce Richardson [this message]
2022-01-11 16:50     ` [PATCH v2 4/4] test_dmadev: increase iterations of capacity test case Kevin Laatz
2022-01-20 13:06   ` [PATCH v2 0/4] fixes for dma/idxd Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220111134105.1007191-5-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=kevin.laatz@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).