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: 235391 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2833665ilg; Mon, 13 Jul 2020 06:19:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJUx1LTZ31seNiDWyTpwu15M2OIl+yBu1/icIRcNueUCQo489nCoLcUMqDg9W15gb7UbR9 X-Received: by 2002:a1c:8117:: with SMTP id c23mr17955165wmd.157.1594646369721; Mon, 13 Jul 2020 06:19:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594646369; cv=none; d=google.com; s=arc-20160816; b=ZRTc2t/W76noOBWimcK/5cjXzj1rLUI56g/iJa/uhqgz6m81LPryPDNDFBVMFmDGkc yfX0KJ+zoVU+drgKHJmpX5GteGKBzbGiHquU+d4QJiH2WhtHEo5QiNoPV2eNaiUs8NSd gMLkTiuHN6/5gHIOsi/EBAwktZAaMw8vKWM22X/SOB5AvAP6P5KOi731VtmlD0ffzm55 gmk8/a+NL6coZgfT1enEN7AurR+kPFA/T9W/ar5PWOzlePmjU61AHre8KcVTEKVpxNGl w7/kSMqsXSb5wb5uhS9Rg4SBhtWzJszau0aMfpAYaMhbYmeswmKCE+Kp9v87/SwASqL8 W/xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=WvVNU2CTOhkXqekrkTYrXzNvsUT5tepuOvaaDd5nbOg=; b=jgTj7lX6JXkIj4/XdbHX9FRv2zP6CM9CbYjtKSKIkwFLHTYBSGQxg6dyqnhyfA8BIA 14VKIEgD5fzFwro83ipVHGgzUou4N9nG1jUIAAIoB6hElw9xr0pzp63Mxd6825DzbTNA bPkpj9lGPmTrWJKebysrK3fAmIQ9V6CusXRAfuey9Tg7ar/3OT9aIdTX238Bl76O6ty6 j5Zv4XiOU+NxD0QBh+FcLeMhHgdR1jIySadjzZL+HuOlwggiQVZayxsHf0wJGXallSuZ fLwx6DkVmL1Z5ujDKYJ9xbq3tNLfwbxsnSt1qGQNBOYSEHCVz2l4rf9PJ2kEpqbF+Qw2 Fw3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id 131si13309188wmb.36.2020.07.13.06.19.29; Mon, 13 Jul 2020 06:19:29 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com 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(+) -- 2.17.1 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; }