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 <m...@smartsharesystems.com> Acked-by: Paul Szczepanek <paul.szczepa...@arm.com> Acked-by: Andrew Rybchenko <andrew.rybche...@oktetlabs.ru> Acked-by: Konstantin Ananyev <konstantin.anan...@huawei.com> --- v3: * Fix output indentation. * Print in existing loop, instead of adding a new loop. v2: * Dump one line per entry. Remove index number and headline. (Stephen, Konstantin.) * Changed reviewed-by to acked-by. --- lib/mempool/rte_mempool.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c index 12390a2c81..7ab1fcb480 100644 --- a/lib/mempool/rte_mempool.c +++ b/lib/mempool/rte_mempool.c @@ -1257,8 +1257,11 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp) ops = rte_mempool_get_ops(mp->ops_index); fprintf(f, " ops_name: <%s>\n", (ops != NULL) ? ops->name : "NA"); - STAILQ_FOREACH(memhdr, &mp->mem_list, next) + 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); mem_len += memhdr->len; + } if (mem_len != 0) { fprintf(f, " avg bytes/object=%#Lf\n", (long double)mem_len / mp->size); -- 2.17.1