From patchwork Mon Jul 13 13:15:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 73941 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0F6DBA0540; Mon, 13 Jul 2020 15:19:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 840FB1D658; Mon, 13 Jul 2020 15:19:28 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 1ED2A1D657 for ; Mon, 13 Jul 2020 15:19:28 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id EC4F12000AB; Mon, 13 Jul 2020 15:19:27 +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 D9E1520006A; Mon, 13 Jul 2020 15:19:25 +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 C9368402AA; Mon, 13 Jul 2020 21:19:22 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: maryam.tahhan@intel.com, reshma.pattan@intel.com, Hemant Agrawal Date: Mon, 13 Jul 2020 18:45:00 +0530 Message-Id: <20200713131501.17422-1-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200711095343.10523-1-hemant.agrawal@nxp.com> References: <20200711095343.10523-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 1/2] app/proc-info: enhance mempool 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 mempool details to also print the ops index and name Signed-off-by: Hemant Agrawal --- 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(+) 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; }