patch 'test/dma: fix pointers in IOVA as PA mode' has been queued to stable release 22.11.8

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Mar 7 13:24:25 CET 2025


Hi,

FYI, your patch has been queued to stable release 22.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/09/25. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5803110850a7d8d24d03da7a223dde5de8a798dd

Thanks.

Luca Boccassi

---
>From 5803110850a7d8d24d03da7a223dde5de8a798dd Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Thu, 27 Feb 2025 13:27:49 +0000
Subject: [PATCH] test/dma: fix pointers in IOVA as PA mode

[ upstream commit 5879d209d847c1025d0852dad7f3bee3e5cff2f6 ]

When running without IOMMU for address translation, i.e. IOVAs are
physical rather than virtual addresses, we need to translate the
pointers to IOVAs for the completion API tests.

Fixes: 9942ebb9c698 ("test/dma: add dmadev API test")

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Reviewed-by: Chengwen Feng <fengchengwen at huawei.com>
---
 app/test/test_dmadev_api.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/app/test/test_dmadev_api.c b/app/test/test_dmadev_api.c
index 4a181af90a..0e66784de7 100644
--- a/app/test/test_dmadev_api.c
+++ b/app/test/test_dmadev_api.c
@@ -441,7 +441,9 @@ test_dma_completed(void)
 	setup_memory();
 
 	/* Check enqueue without submit */
-	ret = rte_dma_copy(test_dev_id, 0, (rte_iova_t)src, (rte_iova_t)dst,
+	ret = rte_dma_copy(test_dev_id, 0,
+			   rte_malloc_virt2iova(src),
+			   rte_malloc_virt2iova(dst),
 			   TEST_MEMCPY_SIZE, 0);
 	RTE_TEST_ASSERT_EQUAL(ret, 0, "Failed to enqueue copy, %d", ret);
 	rte_delay_us_sleep(TEST_WAIT_US_VAL);
@@ -463,7 +465,9 @@ test_dma_completed(void)
 	setup_memory();
 
 	/* Check for enqueue with submit */
-	ret = rte_dma_copy(test_dev_id, 0, (rte_iova_t)src, (rte_iova_t)dst,
+	ret = rte_dma_copy(test_dev_id, 0,
+			   rte_malloc_virt2iova(src),
+			   rte_malloc_virt2iova(dst),
 			   TEST_MEMCPY_SIZE, RTE_DMA_OP_FLAG_SUBMIT);
 	RTE_TEST_ASSERT_EQUAL(ret, 1, "Failed to enqueue copy, %d", ret);
 	rte_delay_us_sleep(TEST_WAIT_US_VAL);
@@ -498,7 +502,9 @@ test_dma_completed_status(void)
 	RTE_TEST_ASSERT_SUCCESS(ret, "Failed to start, %d", ret);
 
 	/* Check for enqueue with submit */
-	ret = rte_dma_copy(test_dev_id, 0, (rte_iova_t)src, (rte_iova_t)dst,
+	ret = rte_dma_copy(test_dev_id, 0,
+			   rte_malloc_virt2iova(src),
+			   rte_malloc_virt2iova(dst),
 			   TEST_MEMCPY_SIZE, RTE_DMA_OP_FLAG_SUBMIT);
 	RTE_TEST_ASSERT_EQUAL(ret, 0, "Failed to enqueue copy, %d", ret);
 	rte_delay_us_sleep(TEST_WAIT_US_VAL);
@@ -517,7 +523,9 @@ test_dma_completed_status(void)
 	RTE_TEST_ASSERT_EQUAL(cpl_ret, 0, "Failed to completed status");
 
 	/* Check for enqueue with submit again */
-	ret = rte_dma_copy(test_dev_id, 0, (rte_iova_t)src, (rte_iova_t)dst,
+	ret = rte_dma_copy(test_dev_id, 0,
+			   rte_malloc_virt2iova(src),
+			   rte_malloc_virt2iova(dst),
 			   TEST_MEMCPY_SIZE, RTE_DMA_OP_FLAG_SUBMIT);
 	RTE_TEST_ASSERT_EQUAL(ret, 1, "Failed to enqueue copy, %d", ret);
 	rte_delay_us_sleep(TEST_WAIT_US_VAL);
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-03-07 12:23:38.974778396 +0000
+++ 0026-test-dma-fix-pointers-in-IOVA-as-PA-mode.patch	2025-03-07 12:23:38.034839111 +0000
@@ -1 +1 @@
-From 5879d209d847c1025d0852dad7f3bee3e5cff2f6 Mon Sep 17 00:00:00 2001
+From 5803110850a7d8d24d03da7a223dde5de8a798dd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5879d209d847c1025d0852dad7f3bee3e5cff2f6 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index d40c05cfbf..fb49fcb56b 100644
+index 4a181af90a..0e66784de7 100644
@@ -23 +24 @@
-@@ -515,7 +515,9 @@ test_dma_completed(void)
+@@ -441,7 +441,9 @@ test_dma_completed(void)
@@ -34 +35 @@
-@@ -537,7 +539,9 @@ test_dma_completed(void)
+@@ -463,7 +465,9 @@ test_dma_completed(void)
@@ -45 +46 @@
-@@ -572,7 +576,9 @@ test_dma_completed_status(void)
+@@ -498,7 +502,9 @@ test_dma_completed_status(void)
@@ -56 +57 @@
-@@ -591,7 +597,9 @@ test_dma_completed_status(void)
+@@ -517,7 +523,9 @@ test_dma_completed_status(void)


More information about the stable mailing list