From: Hemant Agrawal Date: Tue, 8 Sep 2020 05:41:53 +0000 (+0530) Subject: mempool: dump handler index and name X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b24b8928956bccc7f02ecded41b9f784d6f8b8f8;p=dpdk.git mempool: dump handler index and name Enhance the dump function to also print the ops index and associated mempool ops name Signed-off-by: Hemant Agrawal Acked-by: Andrew Rybchenko --- diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c index afd12b37a8..b9f3fbd614 100644 --- a/lib/librte_mempool/rte_mempool.c +++ b/lib/librte_mempool/rte_mempool.c @@ -1196,6 +1196,7 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp) unsigned lcore_id; #endif struct rte_mempool_memhdr *memhdr; + struct rte_mempool_ops *ops; unsigned common_count; unsigned cache_count; size_t mem_len = 0; @@ -1219,6 +1220,10 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp) fprintf(f, " private_data_size=%"PRIu32"\n", mp->private_data_size); + fprintf(f, " ops_index=%d\n", mp->ops_index); + 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) mem_len += memhdr->len; if (mem_len != 0) {