DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] test/dma: fix for buffer auto free
@ 2023-11-01 10:18 Amit Prakash Shukla
  2023-11-01 14:08 ` Hemant Agrawal
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Amit Prakash Shukla @ 2023-11-01 10:18 UTC (permalink / raw)
  To: Chengwen Feng, Kevin Laatz, Bruce Richardson
  Cc: dev, jerinj, conor.walsh, vattunuru, g.singh, sachin.saxena,
	hemant.agrawal, cheng1.jiang, ndabilpuram, anoobj, mb,
	Amit Prakash Shukla

Buffer auto free test failed for more than 1 dma device as the device
initialization for the test was been done only for the first dma device.
This changeset fixes the same.

Fixes: 877cb3e37426 ("dmadev: add buffer auto free offload")

Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
---
 app/test/test_dmadev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c
index 216f84b6bb..3d4cb37ee6 100644
--- a/app/test/test_dmadev.c
+++ b/app/test/test_dmadev.c
@@ -49,6 +49,8 @@ struct dma_add_test dma_add_test[] = {
 	[TEST_M2D_AUTO_FREE] = {.name = "m2d_auto_free", .enabled = false},
 };
 
+static bool dev_init;
+
 static void
 __rte_format_printf(3, 4)
 print_err(const char *func, int lineno, const char *format, ...)
@@ -837,7 +839,6 @@ test_m2d_auto_free(int16_t dev_id, uint16_t vchan)
 	};
 	uint32_t buf_cnt1, buf_cnt2;
 	struct rte_mempool_ops *ops;
-	static bool dev_init;
 	uint16_t nb_done = 0;
 	bool dma_err = false;
 	int retry = 100;
@@ -1011,6 +1012,7 @@ test_dmadev_instance(int16_t dev_id)
 
 	if ((info.dev_capa & RTE_DMA_CAPA_M2D_AUTO_FREE) &&
 	    dma_add_test[TEST_M2D_AUTO_FREE].enabled == true) {
+		dev_init = false;
 		if (runtest("m2d_auto_free", test_m2d_auto_free, 128, dev_id, vchan,
 			    CHECK_ERRS) < 0)
 			goto err;
-- 
2.25.1


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

end of thread, other threads:[~2023-11-14 14:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-01 10:18 [PATCH] test/dma: fix for buffer auto free Amit Prakash Shukla
2023-11-01 14:08 ` Hemant Agrawal
2023-11-02  2:06 ` fengchengwen
2023-11-02  9:40   ` [EXT] " Amit Prakash Shukla
2023-11-03 18:30 ` [PATCH v2] " Amit Prakash Shukla
2023-11-06  1:08   ` fengchengwen
2023-11-14 14:58     ` Thomas Monjalon

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