From: Shijith Thotton <sthotton@marvell.com>
To: <dev@dpdk.org>
Cc: Shijith Thotton <sthotton@marvell.com>,
<Honnappa.Nagarahalli@arm.com>, <bruce.richardson@intel.com>,
<jerinj@marvell.com>, <mb@smartsharesystems.com>,
<olivier.matz@6wind.com>, <stephen@networkplumber.org>,
<thomas@monjalon.net>, <ferruh.yigit@amd.com>,
<pbhagavatula@marvell.com>,
Chengwen Feng <fengchengwen@huawei.com>,
"Kevin Laatz" <kevin.laatz@intel.com>
Subject: [PATCH v4 2/7] test/dma: use API to get mbuf data physical address
Date: Sat, 8 Oct 2022 01:00:24 +0530 [thread overview]
Message-ID: <79cf69f1f413923dc4ea28bbb378b340f19778c2.1665170500.git.sthotton@marvell.com> (raw)
In-Reply-To: <cover.1665170499.git.sthotton@marvell.com>
Used rte_mbuf_data_iova API to get the physical address of mbuf data.
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
---
app/test/test_dmadev.c | 33 ++++++++++++++-------------------
1 file changed, 14 insertions(+), 19 deletions(-)
diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c
index 9e8e101f40..fe62e98af8 100644
--- a/app/test/test_dmadev.c
+++ b/app/test/test_dmadev.c
@@ -110,8 +110,8 @@ do_multi_copies(int16_t dev_id, uint16_t vchan,
for (j = 0; j < COPY_LEN/sizeof(uint64_t); j++)
src_data[j] = rte_rand();
- if (rte_dma_copy(dev_id, vchan, srcs[i]->buf_iova + srcs[i]->data_off,
- dsts[i]->buf_iova + dsts[i]->data_off, COPY_LEN, 0) != id_count++)
+ if (rte_dma_copy(dev_id, vchan, rte_mbuf_data_iova(srcs[i]),
+ rte_mbuf_data_iova(dsts[i]), COPY_LEN, 0) != id_count++)
ERR_RETURN("Error with rte_dma_copy for buffer %u\n", i);
}
rte_dma_submit(dev_id, vchan);
@@ -317,9 +317,8 @@ test_failure_in_full_burst(int16_t dev_id, uint16_t vchan, bool fence,
rte_dma_stats_get(dev_id, vchan, &baseline); /* get a baseline set of stats */
for (i = 0; i < COMP_BURST_SZ; i++) {
int id = rte_dma_copy(dev_id, vchan,
- (i == fail_idx ? 0 : (srcs[i]->buf_iova + srcs[i]->data_off)),
- dsts[i]->buf_iova + dsts[i]->data_off,
- COPY_LEN, OPT_FENCE(i));
+ (i == fail_idx ? 0 : rte_mbuf_data_iova(srcs[i])),
+ rte_mbuf_data_iova(dsts[i]), COPY_LEN, OPT_FENCE(i));
if (id < 0)
ERR_RETURN("Error with rte_dma_copy for buffer %u\n", i);
if (i == fail_idx)
@@ -407,9 +406,8 @@ test_individual_status_query_with_failure(int16_t dev_id, uint16_t vchan, bool f
for (j = 0; j < COMP_BURST_SZ; j++) {
int id = rte_dma_copy(dev_id, vchan,
- (j == fail_idx ? 0 : (srcs[j]->buf_iova + srcs[j]->data_off)),
- dsts[j]->buf_iova + dsts[j]->data_off,
- COPY_LEN, OPT_FENCE(j));
+ (j == fail_idx ? 0 : rte_mbuf_data_iova(srcs[j])),
+ rte_mbuf_data_iova(dsts[j]), COPY_LEN, OPT_FENCE(j));
if (id < 0)
ERR_RETURN("Error with rte_dma_copy for buffer %u\n", j);
if (j == fail_idx)
@@ -470,9 +468,8 @@ test_single_item_status_query_with_failure(int16_t dev_id, uint16_t vchan,
for (j = 0; j < COMP_BURST_SZ; j++) {
int id = rte_dma_copy(dev_id, vchan,
- (j == fail_idx ? 0 : (srcs[j]->buf_iova + srcs[j]->data_off)),
- dsts[j]->buf_iova + dsts[j]->data_off,
- COPY_LEN, 0);
+ (j == fail_idx ? 0 : rte_mbuf_data_iova(srcs[j])),
+ rte_mbuf_data_iova(dsts[j]), COPY_LEN, 0);
if (id < 0)
ERR_RETURN("Error with rte_dma_copy for buffer %u\n", j);
if (j == fail_idx)
@@ -529,15 +526,14 @@ test_multi_failure(int16_t dev_id, uint16_t vchan, struct rte_mbuf **srcs, struc
/* enqueue and gather completions in one go */
for (j = 0; j < COMP_BURST_SZ; j++) {
- uintptr_t src = srcs[j]->buf_iova + srcs[j]->data_off;
+ uintptr_t src = rte_mbuf_data_iova(srcs[j]);
/* set up for failure if the current index is anywhere is the fails array */
for (i = 0; i < num_fail; i++)
if (j == fail[i])
src = 0;
- int id = rte_dma_copy(dev_id, vchan,
- src, dsts[j]->buf_iova + dsts[j]->data_off,
- COPY_LEN, 0);
+ int id = rte_dma_copy(dev_id, vchan, src, rte_mbuf_data_iova(dsts[j]),
+ COPY_LEN, 0);
if (id < 0)
ERR_RETURN("Error with rte_dma_copy for buffer %u\n", j);
}
@@ -565,15 +561,14 @@ test_multi_failure(int16_t dev_id, uint16_t vchan, struct rte_mbuf **srcs, struc
/* enqueue and gather completions in bursts, but getting errors one at a time */
for (j = 0; j < COMP_BURST_SZ; j++) {
- uintptr_t src = srcs[j]->buf_iova + srcs[j]->data_off;
+ uintptr_t src = rte_mbuf_data_iova(srcs[j]);
/* set up for failure if the current index is anywhere is the fails array */
for (i = 0; i < num_fail; i++)
if (j == fail[i])
src = 0;
- int id = rte_dma_copy(dev_id, vchan,
- src, dsts[j]->buf_iova + dsts[j]->data_off,
- COPY_LEN, 0);
+ int id = rte_dma_copy(dev_id, vchan, src, rte_mbuf_data_iova(dsts[j]),
+ COPY_LEN, 0);
if (id < 0)
ERR_RETURN("Error with rte_dma_copy for buffer %u\n", j);
}
--
2.25.1
next prev parent reply other threads:[~2022-10-07 19:31 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 16:25 [PATCH] mbuf: add mbuf physical address field to dynamic field Shijith Thotton
2022-06-30 16:45 ` Stephen Hemminger
2022-07-01 12:16 ` Shijith Thotton
2022-07-01 12:24 ` Shijith Thotton
2022-07-03 7:31 ` Morten Brørup
2022-07-04 14:00 ` Bruce Richardson
2022-08-03 15:34 ` [EXT] " Shijith Thotton
2022-08-29 15:16 ` [PATCH v1 0/4] mbuf dynamic field expansion Shijith Thotton
2022-09-07 13:43 ` [PATCH v2 0/5] " Shijith Thotton
2022-09-21 9:43 ` David Marchand
2022-09-21 14:01 ` [EXT] " Shijith Thotton
2022-09-21 13:56 ` [PATCH v3 " Shijith Thotton
2022-09-21 13:56 ` [PATCH v3 1/5] build: add meson option to configure IOVA mode as VA Shijith Thotton
2022-09-28 12:52 ` Olivier Matz
2022-09-29 5:48 ` [EXT] " Shijith Thotton
2022-09-21 13:56 ` [PATCH v3 2/5] mbuf: add second dynamic field member for VA only build Shijith Thotton
2022-09-28 7:24 ` Thomas Monjalon
2022-09-28 12:52 ` Olivier Matz
2022-09-28 19:33 ` Thomas Monjalon
2022-09-28 19:48 ` Stephen Hemminger
2022-09-29 6:13 ` [EXT] " Shijith Thotton
2022-09-28 12:52 ` Olivier Matz
2022-09-21 13:56 ` [PATCH v3 3/5] lib: move mbuf next pointer to first cache line Shijith Thotton
2022-09-21 14:07 ` Morten Brørup
2022-09-28 12:52 ` Olivier Matz
2022-09-29 6:14 ` [EXT] " Shijith Thotton
2022-09-21 13:56 ` [PATCH v3 4/5] drivers: mark Marvell cnxk PMDs work with IOVA as VA Shijith Thotton
2022-09-28 12:53 ` Olivier Matz
2022-09-29 6:19 ` [EXT] " Shijith Thotton
2022-09-29 7:44 ` Olivier Matz
2022-09-29 8:10 ` Shijith Thotton
2022-10-07 20:17 ` Olivier Matz
2022-10-07 20:22 ` [EXT] " Shijith Thotton
2022-09-21 13:56 ` [PATCH v3 5/5] drivers: mark software " Shijith Thotton
2022-09-28 5:41 ` [PATCH v3 0/5] mbuf dynamic field expansion Shijith Thotton
2022-09-28 12:52 ` Olivier Matz
2022-09-29 4:51 ` [EXT] " Shijith Thotton
2022-10-07 13:50 ` Thomas Monjalon
2022-10-07 19:35 ` [EXT] " Shijith Thotton
2022-10-07 19:30 ` [PATCH v4 0/7] " Shijith Thotton
2022-10-07 19:30 ` [PATCH v4 1/7] mbuf: add API to get and set mbuf physical address Shijith Thotton
2022-10-07 20:16 ` Olivier Matz
2022-10-07 20:20 ` [EXT] " Shijith Thotton
2022-10-07 19:30 ` Shijith Thotton [this message]
2022-10-07 20:17 ` [PATCH v4 2/7] test/dma: use API to get mbuf data " Olivier Matz
2022-10-07 19:30 ` [PATCH v4 3/7] build: add meson option to configure IOVA mode as PA Shijith Thotton
2022-10-07 19:30 ` [PATCH v4 4/7] mbuf: add second dynamic field member Shijith Thotton
2022-10-07 19:30 ` [PATCH v4 5/7] lib: move mbuf next pointer to first cache line Shijith Thotton
2022-10-07 19:30 ` [PATCH v4 6/7] drivers: mark cnxk PMDs work with IOVA as PA disabled Shijith Thotton
2022-10-07 19:30 ` [PATCH v4 7/7] drivers: mark software " Shijith Thotton
2022-10-07 20:19 ` [PATCH v4 0/7] mbuf dynamic field expansion Olivier Matz
2022-10-07 21:02 ` [PATCH v5 " Shijith Thotton
2022-10-07 21:02 ` [PATCH v5 1/7] mbuf: add API to get and set mbuf physical address Shijith Thotton
2022-10-07 21:20 ` Stephen Hemminger
2022-10-07 21:02 ` [PATCH v5 2/7] test/dma: use API to get mbuf data " Shijith Thotton
2022-10-07 21:02 ` [PATCH v5 3/7] build: add meson option to configure IOVA mode as PA Shijith Thotton
2022-10-07 21:02 ` [PATCH v5 4/7] mbuf: add second dynamic field member Shijith Thotton
2022-10-07 21:02 ` [PATCH v5 5/7] lib: move mbuf next pointer to first cache line Shijith Thotton
2022-10-07 21:22 ` Stephen Hemminger
2022-10-07 21:30 ` [EXT] " Shijith Thotton
2022-10-07 21:02 ` [PATCH v5 6/7] drivers: mark cnxk PMDs work with IOVA as PA disabled Shijith Thotton
2022-10-07 21:02 ` [PATCH v5 7/7] drivers: mark software " Shijith Thotton
2022-10-09 9:34 ` [PATCH v5 0/7] mbuf dynamic field expansion Thomas Monjalon
2022-09-07 13:43 ` [PATCH v2 1/5] build: add meson option to configure IOVA mode as VA Shijith Thotton
2022-09-07 15:31 ` Stephen Hemminger
2022-09-07 15:38 ` Bruce Richardson
2022-09-07 21:33 ` Morten Brørup
2022-09-07 13:43 ` [PATCH v2 2/5] mbuf: add second dynamic field member for VA only build Shijith Thotton
2022-09-07 13:43 ` [PATCH v2 3/5] lib: move mbuf next pointer to first cache line Shijith Thotton
2022-09-07 13:43 ` [PATCH v2 4/5] drivers: mark Marvell cnxk PMDs work with IOVA as VA Shijith Thotton
2022-09-07 13:43 ` [PATCH v2 5/5] drivers: mark software " Shijith Thotton
2022-08-29 15:16 ` [PATCH v1 1/4] build: add meson option to configure IOVA mode " Shijith Thotton
2022-08-29 18:18 ` Morten Brørup
2022-08-30 8:32 ` Bruce Richardson
2022-08-29 15:16 ` [PATCH v1 2/4] mbuf: add second dynamic field member for VA only build Shijith Thotton
2022-08-29 18:32 ` Morten Brørup
2022-08-30 8:35 ` Bruce Richardson
2022-08-30 8:41 ` [EXT] " Pavan Nikhilesh Bhagavatula
2022-08-30 13:22 ` Honnappa Nagarahalli
2022-09-07 13:55 ` Shijith Thotton
2022-08-29 15:16 ` [PATCH v1 3/4] drivers: mark Marvell cnxk PMDs work with IOVA as VA Shijith Thotton
2022-08-29 15:16 ` [PATCH v1 4/4] drivers: mark software " Shijith Thotton
2022-08-30 13:07 ` [PATCH] mbuf: add mbuf physical address field to dynamic field Ferruh Yigit
2022-09-12 13:19 ` [EXT] " Shijith Thotton
2022-06-30 16:55 ` Bruce Richardson
2022-07-01 9:48 ` Olivier Matz
2022-07-01 11:53 ` Slava Ovsiienko
2022-07-01 12:01 ` [EXT] " Shijith Thotton
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=79cf69f1f413923dc4ea28bbb378b340f19778c2.1665170500.git.sthotton@marvell.com \
--to=sthotton@marvell.com \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=ferruh.yigit@amd.com \
--cc=jerinj@marvell.com \
--cc=kevin.laatz@intel.com \
--cc=mb@smartsharesystems.com \
--cc=olivier.matz@6wind.com \
--cc=pbhagavatula@marvell.com \
--cc=stephen@networkplumber.org \
--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).