From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: dev@dpdk.org
Cc: olivier.matz@6wind.com, Hemant Agrawal <hemant.agrawal@nxp.com>
Subject: [dpdk-dev] [PATCH] mempool: enhance dump function to print ops name
Date: Sat, 11 Jul 2020 15:29:36 +0530 [thread overview]
Message-ID: <20200711095936.11535-1-hemant.agrawal@nxp.com> (raw)
Enhance the dump function to also print the ops index
and associated mempool ops name
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
lib/librte_mempool/rte_mempool.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index 5b23e2ae78..462ea850a1 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -1186,6 +1186,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;
@@ -1208,6 +1209,10 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp)
fprintf(f, " private_data_size=%"PRIu32"\n", mp->private_data_size);
+ ops = rte_mempool_get_ops(mp->ops_index);
+ fprintf(f, " ops_index=%d ops_name: <%s>\n",
+ mp->ops_index, ops ? ops->name:"NA");
+
STAILQ_FOREACH(memhdr, &mp->mem_list, next)
mem_len += memhdr->len;
if (mem_len != 0) {
@@ -1250,7 +1255,6 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp)
#else
fprintf(f, " no statistics available\n");
#endif
-
rte_mempool_audit(mp);
}
--
2.17.1
next reply other threads:[~2020-07-11 10:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-11 9:59 Hemant Agrawal [this message]
2020-07-31 12:55 ` Olivier Matz
2020-08-17 11:15 ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
2020-08-29 11:29 ` Andrew Rybchenko
2020-09-08 5:41 ` [dpdk-dev] [PATCH v3] " Hemant Agrawal
2020-10-06 21:43 ` Thomas Monjalon
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=20200711095936.11535-1-hemant.agrawal@nxp.com \
--to=hemant.agrawal@nxp.com \
--cc=dev@dpdk.org \
--cc=olivier.matz@6wind.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).