All of lore.kernel.org
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] test/mbuf: fix virtual address conversion
@ 2021-07-05  7:27 Olivier Matz
  2021-07-06 11:50 ` David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: Olivier Matz @ 2021-07-05  7:27 UTC (permalink / raw)
  To: dev; +Cc: Reshma Pattan, Lavanya Govindarajan, Zhihong Peng, stable

Seen with address sanitizer.

rte_mempool_virt2iova() can only be used on mempool elements. In this case,
it is incorrect, and rte_mem_virt2iova() has to be used.

Bugzilla ID: 737
Fixes: 7b295dceea07 ("test/mbuf: add unit test cases")
Cc: stable@dpdk.org

Reported-by: Zhihong Peng <zhihongx.peng@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 app/test/test_mbuf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 8e0561eabb..9a248dfaea 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -2363,7 +2363,7 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
 	if (rte_mbuf_refcnt_read(m) != 1)
 		GOTO_FAIL("%s: Invalid refcnt in mbuf\n", __func__);
 
-	buf_iova = rte_mempool_virt2iova(ext_buf_addr);
+	buf_iova = rte_mem_virt2iova(ext_buf_addr);
 	rte_pktmbuf_attach_extbuf(m, ext_buf_addr, buf_iova, buf_len,
 		ret_shinfo);
 	if (m->ol_flags != EXT_ATTACHED_MBUF)
-- 
2.29.2


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

* Re: [dpdk-dev] [PATCH] test/mbuf: fix virtual address conversion
  2021-07-05  7:27 [dpdk-dev] [PATCH] test/mbuf: fix virtual address conversion Olivier Matz
@ 2021-07-06 11:50 ` David Marchand
  2021-07-06 14:42   ` David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2021-07-06 11:50 UTC (permalink / raw)
  To: Olivier Matz
  Cc: dev, Reshma Pattan, Lavanya Govindarajan, Zhihong Peng, dpdk stable

On Mon, Jul 5, 2021 at 9:28 AM Olivier Matz <olivier.matz@6wind.com> wrote:
>
> Seen with address sanitizer.
>
> rte_mempool_virt2iova() can only be used on mempool elements. In this case,
> it is incorrect, and rte_mem_virt2iova() has to be used.
>
> Bugzilla ID: 737
> Fixes: 7b295dceea07 ("test/mbuf: add unit test cases")
> Cc: stable@dpdk.org
>
> Reported-by: Zhihong Peng <zhihongx.peng@intel.com>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


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

* Re: [dpdk-dev] [PATCH] test/mbuf: fix virtual address conversion
  2021-07-06 11:50 ` David Marchand
@ 2021-07-06 14:42   ` David Marchand
  0 siblings, 0 replies; 3+ messages in thread
From: David Marchand @ 2021-07-06 14:42 UTC (permalink / raw)
  To: Olivier Matz
  Cc: dev, Reshma Pattan, Lavanya Govindarajan, Zhihong Peng, dpdk stable

On Tue, Jul 6, 2021 at 1:50 PM David Marchand <david.marchand@redhat.com> wrote:
>
> On Mon, Jul 5, 2021 at 9:28 AM Olivier Matz <olivier.matz@6wind.com> wrote:
> >
> > Seen with address sanitizer.
> >
> > rte_mempool_virt2iova() can only be used on mempool elements. In this case,
> > it is incorrect, and rte_mem_virt2iova() has to be used.
> >
> > Bugzilla ID: 737
> > Fixes: 7b295dceea07 ("test/mbuf: add unit test cases")
> > Cc: stable@dpdk.org
> >
> > Reported-by: Zhihong Peng <zhihongx.peng@intel.com>
> > Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied, thanks.

-- 
David Marchand


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

end of thread, other threads:[~2021-07-06 14:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05  7:27 [dpdk-dev] [PATCH] test/mbuf: fix virtual address conversion Olivier Matz
2021-07-06 11:50 ` David Marchand
2021-07-06 14:42   ` David Marchand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.