From patchwork Tue Jul 21 18:22:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 246939 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3166208ilg; Tue, 21 Jul 2020 11:23:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyypPZyUQqYSTANDmMcympIUYNve/efNP+rDIhHu+Uci2ONgErRanLZYZ7wb14GYsWF9+eu X-Received: by 2002:a25:d952:: with SMTP id q79mr41390703ybg.369.1595355820712; Tue, 21 Jul 2020 11:23:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595355820; cv=none; d=google.com; s=arc-20160816; b=R/B3s8PFU+NgMSHBAloLr3kg5Yl3CJZJeD2TKkQzSq83Qiq/r2nFxU6TSplwV/b23g 9VqopSHD6L0KRjodOqCesa6aOkblUGE+bEpFno6kwM7Zmhz/zvADCBHALaAIFhINMMnZ 9Xi0OSXHKT5IMUH83rhk79607kKg4c21AFR3dOUcAHZCQdFc7/2IWDi6NNY0WZAVEq8f 0kmN/rH5HgpKBJIQvt3zMinRPK0t6+XVwDaP0hQ4ZhifAefNhEe+9nMO7/6TX9J04WJr DvUw7cvzaNNUYUm8ufy+kNq3MlbpZhM1vwfCAnG07F8osv5f01QIXVXHTeovxNcmO46f Owaw== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:cc:to:from:dkim-signature; bh=6DljVwQwZifQ8F3xEcClWR3a4alMcuL6XIRUFg6hoPs=; b=jZrw8Pjod/j6qJNRqwl6F2TeHOtFXp3bV7Pp5Ut6n/QZabRsokKiXDY8OgMrp5UB8B Za5ri5gHUXfX+Gaitiu/pPI5ay8SU0QA4sMcVtjSDU86F47xd5G+0ne6jkTjjRivsmVW 9s8+phDf2Zf8ove/2mdpR1ksbFWM1EjYXwT3VtLklKci907TqNhesp1kASsURXAI7fcR qUblTK/cVUwBcV8RIGbCAUTEzV+HU1biJX4eTtYfnhZgvxcpykfAmR0Vp/JS0OB2f1H9 sGwZqd2MOJsSY1jJGtVShOaG1dEN+6EhGtsS6viO6JaUDicoGQZKujMFUkHyPjvYSc8D 0raQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=jU5Gk+0n; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id r13si20229254ybs.137.2020.07.21.11.23.40; Tue, 21 Jul 2020 11:23:40 -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; dkim=fail header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=jU5Gk+0n; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CDC541C0BC; Tue, 21 Jul 2020 20:23:04 +0200 (CEST) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by dpdk.org (Postfix) with ESMTP id 82CE11C0AC for ; Tue, 21 Jul 2020 20:23:00 +0200 (CEST) Received: by mail-pl1-f193.google.com with SMTP id x8so10611598plm.10 for ; Tue, 21 Jul 2020 11:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6DljVwQwZifQ8F3xEcClWR3a4alMcuL6XIRUFg6hoPs=; b=jU5Gk+0n/W3QL1USq/T+3C5NIWZCfVnpzNxjI+2CYj9Zcw8zgJg5cTTDYrosPL4V3T YseDcZZSGU9hLdzpsdIqbw1aTsmtuILuJYJv4pf1QCTj27YzXILmG2WzM35jDBd1fT/y UQ35QUTrFPLu94PBp8WmpQHNWx0n6ABvntWkJQ7IIDbG7ZQasUt3K4RlptHUrsrb3w4f ujFvd2a0wJFI7JiaxF8c5h98i9Ie7/SdDRdF1eSqLo+8l3qmVdKAFr6JiKYxuDUcY5+v Duj9OHCYuLJcc3ZmLqxX9EoJTMQOTKzK7rOzz3nN4QW9bj19r8NdXUJFvmkbJsosVWUj E3hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6DljVwQwZifQ8F3xEcClWR3a4alMcuL6XIRUFg6hoPs=; b=Hof54o5/wHEz5fNd/Q//kWb1di8xpWX0m4ZHnGTQIcdDMHZS+SSdx3uLZIMkTlZMjK Dp7AU3gRXSBNUwzaSFmr4FtJ2dqFJE4yksNCGU7l6blfUx46ncrq8VyW0ZatWENIjGE2 VodDWdEhpuOQDabTniVXjoNXlECUz66itK3cqzTGNgLzRFFf8Jyimmmu0iryBA3kw5sD K+/qXRDQDjiRytLQeNVZMsA7P4bcdyvj/LE6TKDBoJqfLvFicmLytl9a9t2orn5xAbmG M1XHhFJGdvUeLi9gt4HOKZzzF1Kxzs9uk7wV5OSTE2I1mDBo9Aqk2ImAawAm2A93nSnx JclQ== X-Gm-Message-State: AOAM530C+s4xxJR40FLPYcSW1jKy6L4Y6FaMTXiDYtiIfYFgDv05dSSE tNTcTh/rlR63rdE5Q03iFUx5JJYp/hRNHA== X-Received: by 2002:a17:90a:32cb:: with SMTP id l69mr5462059pjb.205.1595355779305; Tue, 21 Jul 2020 11:22:59 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 76sm21434031pfu.139.2020.07.21.11.22.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 11:22:58 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Hemant Agrawal , Stephen Hemminger Date: Tue, 21 Jul 2020 11:22:39 -0700 Message-Id: <20200721182242.5366-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200721182242.5366-1-stephen@networkplumber.org> References: <20200506193741.24117-1-stephen@networkplumber.org> <20200721182242.5366-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v4 5/8] 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" From: Hemant Agrawal Enhance the mempool details to also print the ops index and name Signed-off-by: Hemant Agrawal Signed-off-by: Stephen Hemminger --- app/proc-info/main.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.27.0 diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 7c1276b7fbc1..f3f83c0cea37 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -1219,7 +1219,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" @@ -1249,6 +1252,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; }