From: Chengwen Feng <fengchengwen@huawei.com>
To: <thomas@monjalon.net>, <Sivaprasad.Tummala@amd.com>,
<Vipin.Varghese@amd.com>
Cc: <dev@dpdk.org>, <bruce.richardson@intel.com>, <kevin.laatz@intel.com>
Subject: [PATCH 2/3] test/dma: reset last-idx before invoke DMA completed ops
Date: Wed, 8 Jun 2022 16:50:06 +0800 [thread overview]
Message-ID: <20220608085007.10679-3-fengchengwen@huawei.com> (raw)
In-Reply-To: <20220608085007.10679-1-fengchengwen@huawei.com>
Some DMA PMD may not update last-idx when no DMA completed, the
previous patch [1] cannot detect this problem actually.
This patch resets last-idx before invoking DMA completed ops to fix it.
[1] test/dma: check index when no DMA completed
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
app/test/test_dmadev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c
index a7651a486f..9e8e101f40 100644
--- a/app/test/test_dmadev.c
+++ b/app/test/test_dmadev.c
@@ -209,6 +209,7 @@ test_enqueue_copies(int16_t dev_id, uint16_t vchan)
dst_data[i], src_data[i]);
/* now check completion works */
+ id = ~id;
if (rte_dma_completed(dev_id, vchan, 1, &id, NULL) != 1)
ERR_RETURN("Error with rte_dma_completed\n");
@@ -217,6 +218,7 @@ test_enqueue_copies(int16_t dev_id, uint16_t vchan)
id, id_count);
/* check for completed and id when no job done */
+ id = ~id;
if (rte_dma_completed(dev_id, vchan, 1, &id, NULL) != 0)
ERR_RETURN("Error with rte_dma_completed when no job done\n");
if (id != id_count)
@@ -224,6 +226,7 @@ test_enqueue_copies(int16_t dev_id, uint16_t vchan)
id, id_count);
/* check for completed_status and id when no job done */
+ id = ~id;
if (rte_dma_completed_status(dev_id, vchan, 1, &id, &status) != 0)
ERR_RETURN("Error with rte_dma_completed_status when no job done\n");
if (id != id_count)
--
2.33.0
next prev parent reply other threads:[~2022-06-08 8:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 8:50 [PATCH 0/3] bugfix and feature for skeleton DMA Chengwen Feng
2022-06-08 8:50 ` [PATCH 1/3] dma/skeleton: fix return last-idx when no memcopy completed Chengwen Feng
2022-06-08 8:50 ` Chengwen Feng [this message]
2022-06-08 8:50 ` [PATCH 3/3] dma/skeleton: support multiple instances Chengwen Feng
2022-06-15 14:19 ` [PATCH 0/3] bugfix and feature for skeleton DMA 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=20220608085007.10679-3-fengchengwen@huawei.com \
--to=fengchengwen@huawei.com \
--cc=Sivaprasad.Tummala@amd.com \
--cc=Vipin.Varghese@amd.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=kevin.laatz@intel.com \
--cc=thomas@monjalon.net \
/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).