* [PATCH 0/2] bugfix and enhance for DMA test
@ 2025-08-27 1:28 Chengwen Feng
2025-08-27 1:28 ` [PATCH 1/2] test/dma: fix some testcase never fail Chengwen Feng
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Chengwen Feng @ 2025-08-27 1:28 UTC (permalink / raw)
To: thomas; +Cc: dev, bruce.richardson, kevin.laatz
This patchset contains one bugfix (some case never fail) and one
enhance (support auto adapt ringsize).
Chengwen Feng (2):
test/dma: fix some testcase never fail
test/dma: support auto adapt ringsize
app/test/test_dmadev.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] test/dma: fix some testcase never fail
2025-08-27 1:28 [PATCH 0/2] bugfix and enhance for DMA test Chengwen Feng
@ 2025-08-27 1:28 ` Chengwen Feng
2025-08-27 1:28 ` [PATCH 2/2] test/dma: support auto adapt ringsize Chengwen Feng
2025-10-15 10:24 ` [PATCH 0/2] bugfix and enhance for DMA test Thomas Monjalon
2 siblings, 0 replies; 5+ messages in thread
From: Chengwen Feng @ 2025-08-27 1:28 UTC (permalink / raw)
To: thomas; +Cc: dev, bruce.richardson, kevin.laatz
In the runtest() function, it will return error if the test return
value is less than 0.
But the 'copy' and 'error_handling' testcase may return 1 if failed
because its internal use or(||) operation.
This commit fix it by treating non-zero as error in runtest() function.
Fixes: 1b86a66a30c2 ("test/dma: add more comprehensive copy tests")
Fixes: 99d7ec4be237 ("test/dma: add failure handling tests")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
app/test/test_dmadev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c
index 9cbb9a6552..482d564f7a 100644
--- a/app/test/test_dmadev.c
+++ b/app/test/test_dmadev.c
@@ -92,7 +92,7 @@ runtest(const void *args)
printf("DMA Dev %d: Running %s Tests %s\n", dev_id, printable,
check_err_stats ? " " : "(errors expected)");
for (i = 0; i < iterations; i++) {
- if (test_fn(dev_id, vchan) < 0)
+ if (test_fn(dev_id, vchan) != 0)
return -1;
rte_dma_stats_get(dev_id, 0, &stats);
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] test/dma: support auto adapt ringsize
2025-08-27 1:28 [PATCH 0/2] bugfix and enhance for DMA test Chengwen Feng
2025-08-27 1:28 ` [PATCH 1/2] test/dma: fix some testcase never fail Chengwen Feng
@ 2025-08-27 1:28 ` Chengwen Feng
2025-08-27 7:36 ` Bruce Richardson
2025-10-15 10:24 ` [PATCH 0/2] bugfix and enhance for DMA test Thomas Monjalon
2 siblings, 1 reply; 5+ messages in thread
From: Chengwen Feng @ 2025-08-27 1:28 UTC (permalink / raw)
To: thomas; +Cc: dev, bruce.richardson, kevin.laatz
The default ringsize is 512, some DMA devices may not support, this
commit support auto adapt ringsize.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
app/test/test_dmadev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c
index 482d564f7a..e1a919cd81 100644
--- a/app/test/test_dmadev.c
+++ b/app/test/test_dmadev.c
@@ -1135,7 +1135,7 @@ test_dmadev_setup(void)
int16_t dev_id = test_dev_id;
struct rte_dma_stats stats;
const struct rte_dma_conf conf = { .nb_vchans = 1};
- const struct rte_dma_vchan_conf qconf = {
+ struct rte_dma_vchan_conf qconf = {
.direction = RTE_DMA_DIR_MEM_TO_MEM,
.nb_desc = TEST_RINGSIZE,
};
@@ -1151,6 +1151,10 @@ test_dmadev_setup(void)
if (rte_dma_configure(dev_id, &conf) != 0)
ERR_RETURN("Error with rte_dma_configure()\n");
+ if (qconf.nb_desc < info.min_desc)
+ qconf.nb_desc = info.min_desc;
+ if (qconf.nb_desc > info.max_desc)
+ qconf.nb_desc = info.max_desc;
if (rte_dma_vchan_setup(dev_id, vchan, &qconf) < 0)
ERR_RETURN("Error with queue configuration\n");
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] test/dma: support auto adapt ringsize
2025-08-27 1:28 ` [PATCH 2/2] test/dma: support auto adapt ringsize Chengwen Feng
@ 2025-08-27 7:36 ` Bruce Richardson
0 siblings, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2025-08-27 7:36 UTC (permalink / raw)
To: Chengwen Feng; +Cc: thomas, dev, kevin.laatz
On Wed, Aug 27, 2025 at 09:28:29AM +0800, Chengwen Feng wrote:
> The default ringsize is 512, some DMA devices may not support, this
> commit support auto adapt ringsize.
>
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> ---
Seems reasonable.
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> app/test/test_dmadev.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c
> index 482d564f7a..e1a919cd81 100644
> --- a/app/test/test_dmadev.c
> +++ b/app/test/test_dmadev.c
> @@ -1135,7 +1135,7 @@ test_dmadev_setup(void)
> int16_t dev_id = test_dev_id;
> struct rte_dma_stats stats;
> const struct rte_dma_conf conf = { .nb_vchans = 1};
> - const struct rte_dma_vchan_conf qconf = {
> + struct rte_dma_vchan_conf qconf = {
> .direction = RTE_DMA_DIR_MEM_TO_MEM,
> .nb_desc = TEST_RINGSIZE,
> };
> @@ -1151,6 +1151,10 @@ test_dmadev_setup(void)
> if (rte_dma_configure(dev_id, &conf) != 0)
> ERR_RETURN("Error with rte_dma_configure()\n");
>
> + if (qconf.nb_desc < info.min_desc)
> + qconf.nb_desc = info.min_desc;
> + if (qconf.nb_desc > info.max_desc)
> + qconf.nb_desc = info.max_desc;
> if (rte_dma_vchan_setup(dev_id, vchan, &qconf) < 0)
> ERR_RETURN("Error with queue configuration\n");
>
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] bugfix and enhance for DMA test
2025-08-27 1:28 [PATCH 0/2] bugfix and enhance for DMA test Chengwen Feng
2025-08-27 1:28 ` [PATCH 1/2] test/dma: fix some testcase never fail Chengwen Feng
2025-08-27 1:28 ` [PATCH 2/2] test/dma: support auto adapt ringsize Chengwen Feng
@ 2025-10-15 10:24 ` Thomas Monjalon
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2025-10-15 10:24 UTC (permalink / raw)
To: Chengwen Feng; +Cc: dev, bruce.richardson, kevin.laatz
27/08/2025 03:28, Chengwen Feng:
> This patchset contains one bugfix (some case never fail) and one
> enhance (support auto adapt ringsize).
>
> Chengwen Feng (2):
> test/dma: fix some testcase never fail
> test/dma: support auto adapt ringsize
Applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-10-15 10:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-27 1:28 [PATCH 0/2] bugfix and enhance for DMA test Chengwen Feng
2025-08-27 1:28 ` [PATCH 1/2] test/dma: fix some testcase never fail Chengwen Feng
2025-08-27 1:28 ` [PATCH 2/2] test/dma: support auto adapt ringsize Chengwen Feng
2025-08-27 7:36 ` Bruce Richardson
2025-10-15 10:24 ` [PATCH 0/2] bugfix and enhance for DMA test Thomas Monjalon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.