From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6EDF6A0528; Sat, 11 Jul 2020 12:03:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C4E9A1D939; Sat, 11 Jul 2020 12:03:58 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 1090F1D62E for ; Sat, 11 Jul 2020 12:03:57 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id E28E8200406; Sat, 11 Jul 2020 12:03:56 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 4171320047A; Sat, 11 Jul 2020 12:03:55 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id A7F8840287; Sat, 11 Jul 2020 18:03:52 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: olivier.matz@6wind.com, Hemant Agrawal Date: Sat, 11 Jul 2020 15:29:36 +0530 Message-Id: <20200711095936.11535-1-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH] mempool: enhance dump function to print ops name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Enhance the dump function to also print the ops index and associated mempool ops name Signed-off-by: Hemant Agrawal --- 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