From: Olivier Matz <olivier.matz@6wind.com>
To: dev@dpdk.org
Cc: Reshma Pattan <reshma.pattan@intel.com>,
Lavanya Govindarajan <lavanyax.govindarajan@intel.com>,
Zhihong Peng <zhihongx.peng@intel.com>,
stable@dpdk.org
Subject: [dpdk-dev] [PATCH] test/mbuf: fix virtual address conversion
Date: Mon, 5 Jul 2021 09:27:34 +0200 [thread overview]
Message-ID: <20210705072734.22484-1-olivier.matz@6wind.com> (raw)
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
next reply other threads:[~2021-07-05 7:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-05 7:27 Olivier Matz [this message]
2021-07-06 11:50 ` David Marchand
2021-07-06 14:42 ` David Marchand
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=20210705072734.22484-1-olivier.matz@6wind.com \
--to=olivier.matz@6wind.com \
--cc=dev@dpdk.org \
--cc=lavanyax.govindarajan@intel.com \
--cc=reshma.pattan@intel.com \
--cc=stable@dpdk.org \
--cc=zhihongx.peng@intel.com \
/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).