[PATCH v4 2/7] test/dma: use API to get mbuf data physical address
Olivier Matz
olivier.matz at 6wind.com
Fri Oct 7 22:17:22 CEST 2022
On Sat, Oct 08, 2022 at 01:00:24AM +0530, Shijith Thotton wrote:
> Used rte_mbuf_data_iova API to get the physical address of mbuf data.
>
> Signed-off-by: Shijith Thotton <sthotton at 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++)
This is not related to your patch, but for the record: I realize that there are
2 APIs for the same thing: rte_pktmbf_iova() and rte_mbuf_data_iova().
More information about the dev
mailing list