diff mbox series

[v3,1/2] app/proc-info: enhance mempool to print ops name

Message ID 20200713131501.17422-1-hemant.agrawal@nxp.com
State New
Headers show
Series [v3,1/2] app/proc-info: enhance mempool to print ops name | expand

Commit Message

Hemant Agrawal July 13, 2020, 1:15 p.m. UTC
Enhance the mempool details to also print the ops index and name

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

---
These patches are built over Stephen's series:
https://patches.dpdk.org/cover/69876/
But they can be applied independently as well.

 app/proc-info/main.c | 5 +++++
 1 file changed, 5 insertions(+)

-- 
2.17.1
diff mbox series

Patch

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index e0b61b366..a5d16765b 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -1276,7 +1276,10 @@  show_mempool(char *name)
 	if (name != NULL) {
 		struct rte_mempool *ptr = rte_mempool_lookup(name);
 		if (ptr != NULL) {
+			struct rte_mempool_ops *ops;
+
 			flags = ptr->flags;
+			ops = rte_mempool_get_ops(ptr->ops_index);
 			printf("  - Name: %s on socket %d\n"
 				"  - flags:\n"
 				"\t  -- No spread (%c)\n"
@@ -1306,6 +1309,8 @@  show_mempool(char *name)
 			printf("  - Count: avail (%u), in use (%u)\n",
 				rte_mempool_avail_count(ptr),
 				rte_mempool_in_use_count(ptr));
+			printf("  - ops_index %d ops_name %s\n",
+				ptr->ops_index, ops ? ops->name : "NA");
 
 			return;
 		}