From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 359F4A0A0F; Mon, 5 Jul 2021 09:27:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CFDA940141; Mon, 5 Jul 2021 09:27:52 +0200 (CEST) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mails.dpdk.org (Postfix) with ESMTP id EC90E4003C for ; Mon, 5 Jul 2021 09:27:51 +0200 (CEST) Received: by mail-wr1-f52.google.com with SMTP id n9so3457604wrs.13 for ; Mon, 05 Jul 2021 00:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zV68DzIXOgL5QMCT9OZhzXM3fp7PQOeTm21F7J4AYyY=; b=N94F67oqTx0mRzUh6aUvICBwEiOuU4bwpPdlSE1Ep7B11NVUyritQ41aUyCtFNuwrk UfCkThjdfLfSHxooqMqvWKIhuyu9mNGix2oj1cJTkjUtV8dxGDqcDRnuSya6ZDhtvG7a GKEH3N2UsF13FKhzZQvK9dueS060a3iyLSy5y8UjhYylwA2BiznJv7RBRwTA+o3ViuUZ yrnNl/D9/ijsJ0zonMC5ch02Yl0hjcKIrYkLs0RS1kx1DxhFxRMMJnu5mfaHeuBQ2Z6r j/w19roPwo1vRFhBoVBrlW8IgxmmZBFPgeCRxN3Q9PosPQTXOeSFoOk+f4rehA71IBjz XMjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zV68DzIXOgL5QMCT9OZhzXM3fp7PQOeTm21F7J4AYyY=; b=EwrTAaU1x4PEAWk+GLVX5twsWrmciVE5hCoPZpDGaw8b+y4SH/LT2IEjbuMtbgadu5 9cQ532WjvjBB3sNCnoFS2X9alFoREX1TAEMpmzLrbq2uZcdNyP/RjYhgaQ5IBCY4dxZj 8cXv1QLrQGh00aLyqDnO5rOyB2B2RSDe9Yko8zU43YgtewcMOjzw0kLmAf6DQJEQNlwy IuzXwhFE6cO8GusRdjcKn2Zdtv5xvNaNzbH77PeHmZFCLyfQ2JVE513ns9lkEQUJWZ9y QnF2BggfO/M9ALyDBuAX9BxWhS/alq09A47yO2Ywfk3Z38pmrRCHiY8u6uqJxZrHEqYG T6eg== X-Gm-Message-State: AOAM530z4OqXa9b6LNnw7l+23PMGh+bLQzuzZUw2VPPF+8sEU2q6CBON zQw+uRzjx3U45gmbZE7IoJFlXwubnQk30w== X-Google-Smtp-Source: ABdhPJzFgo1K5n+guJkcGKJ9bAUyafp1zIBGt9CF0GmDNXqd7wgwjZgi/4G/XMjMf5U4CPCGjYSWpg== X-Received: by 2002:adf:dd82:: with SMTP id x2mr13721996wrl.303.1625470070826; Mon, 05 Jul 2021 00:27:50 -0700 (PDT) Received: from gojira.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id h13sm1274657wrs.68.2021.07.05.00.27.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 00:27:50 -0700 (PDT) From: Olivier Matz To: dev@dpdk.org Cc: Reshma Pattan , Lavanya Govindarajan , Zhihong Peng , stable@dpdk.org Date: Mon, 5 Jul 2021 09:27:34 +0200 Message-Id: <20210705072734.22484-1-olivier.matz@6wind.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] test/mbuf: fix virtual address conversion X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Signed-off-by: Olivier Matz --- 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