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 D8B58424C4; Tue, 11 Jun 2024 08:50:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E0CE4021F; Tue, 11 Jun 2024 08:50:39 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id B1EA2400D6 for ; Tue, 11 Jun 2024 08:50:37 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 86A452035F; Tue, 11 Jun 2024 08:50:37 +0200 (CEST) Received: from dkrd2.smartsharesys.local ([192.168.4.12]) by smartserver.smartsharesystems.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 11 Jun 2024 08:50:37 +0200 From: =?UTF-8?q?Morten=20Br=C3=B8rup?= To: dev@dpdk.org Cc: stephen@networkplumber.org, =?UTF-8?q?Morten=20Br=C3=B8rup?= Subject: [PATCH v2] mempool: dump includes list of memory chunks Date: Tue, 11 Jun 2024 08:50:36 +0200 Message-Id: <20240611065036.13344-1-mb@smartsharesystems.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240516085940.61119-1-mb@smartsharesystems.com> References: <20240516085940.61119-1-mb@smartsharesystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 11 Jun 2024 06:50:37.0441 (UTC) FILETIME=[AA846710:01DABBCB] 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 Added information about the memory chunks holding the objects in the mempool when dumping the status of the mempool to a file. Signed-off-by: Morten Brørup Acked-by: Paul Szczepanek Acked-by: Andrew Rybchenko Acked-by: Konstantin Ananyev --- v2: * Dump one line per entry. Remove headline and index number. (Stephen, Konstantin.) * Changed reviewed-by to acked-by. --- lib/mempool/rte_mempool.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c index 12390a2c81..f72cbc7217 100644 --- a/lib/mempool/rte_mempool.c +++ b/lib/mempool/rte_mempool.c @@ -1264,6 +1264,10 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp) (long double)mem_len / mp->size); } + STAILQ_FOREACH(memhdr, &mp->mem_list, next) + fprintf(f, " memory chunk at %p, addr=%p, iova=0x%" PRIx64 ", len=%zu\n", + memhdr, memhdr->addr, memhdr->iova, memhdr->len); + cache_count = rte_mempool_dump_cache(f, mp); common_count = rte_mempool_ops_get_count(mp); if ((cache_count + common_count) > mp->size) -- 2.17.1