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 7A921A04B1; Thu, 24 Sep 2020 07:34:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 717981DD37; Thu, 24 Sep 2020 07:34:47 +0200 (CEST) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 8536B1DD1A for ; Thu, 24 Sep 2020 07:34:44 +0200 (CEST) Received: by mail-pf1-f196.google.com with SMTP id x22so1168134pfo.12 for ; Wed, 23 Sep 2020 22:34:44 -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=fJLgDcwAY75eJo/g5WkIbbI1RS4Ra/fQ9hmMyG+nJSE=; b=tZzcIY6XIKN4xXQxkAZ/0C2IOx48vgbW+XE9f2j+fKA85S+P9AdDNOnR10NlcO8fSm vu4BjOHV8xDZGDfw5KgNUSAQCxDP2E8GM2ZQ7QnA+qgJCe87dd7qdMH0misYrtGPEaLf jmFSkdA0yqf39GBT6lvtXkycpqGP5K3RFRnbwFPLrfLRIFwWMeIVty5whUhswtEPW02/ XcUTsk4KBzK3ZMvVdtey4Mg0YnbUJJeyYCmG5/AAzIHgKhN/Vb+r3luO8yCTU1wIl/Or nSI3PBFAjCq3TRhfE0c2+bCyk3GiliKM79FYPR+p6RD1dNZqmmvHcPrsUXyNA7Rt5q2G k0Zg== 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=fJLgDcwAY75eJo/g5WkIbbI1RS4Ra/fQ9hmMyG+nJSE=; b=Mwf6gtT3KycdsZXYaADk5ytDqfiwYyja2NiTyp9BDtPi5rFFhsbr6Mz+nhQhYhJUJ4 8RKDA0ijtjqr/3fgyAdEucDCASrzilBC0CHrImqJBOdjxexmPNh5B2zytShc4sl07ekN 9NFWcEapNyZlqD8Q3Ib9LvJbIgwf2hD1rEyU3nKdwrM+0z79D53CcFxwGHcCJnc4Wjj5 jsTXStPrHCS2SoJAfyicYfIqCkaAPVMtdQ18CR4KEnkZl+gUxkCBAHAbozpwpWd0nPOs dA8OLeoYzkznXcydycz7Ppqm16BR8Ig6Y3isfyJ84EChnSSLboqVgMkXYY9QpvEmxIxy T0+w== X-Gm-Message-State: AOAM530KWA8BVRiFNWOPtbCeprXF0KgyWm0qruKDpxRSkBXgFP9sFKTP 5L6B8HHu0CyzC/LQ7D4UCrKYGoWZrW9GTA== X-Google-Smtp-Source: ABdhPJyd4wGBxxjCbYbL4MDtyMLu4WcEJULIXu3htMq8rCvJ6jWBzu+qZ7CsRhEnkuzS5fzZKLpgcA== X-Received: by 2002:a63:c804:: with SMTP id z4mr2637954pgg.170.1600925683287; Wed, 23 Sep 2020 22:34:43 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id v8sm1529609pgg.58.2020.09.23.22.34.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Sep 2020 22:34:42 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Hemant Agrawal Date: Wed, 23 Sep 2020 22:34:28 -0700 Message-Id: <20200924053433.12648-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200924053433.12648-1-stephen@networkplumber.org> References: <20200728191330.20864-1-stephen@networkplumber.org> <20200924053433.12648-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v6 2/7] app/proc-info: eliminate useless borders 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" Printing extra borders does not improve readability, and is just unnecessary. Putting TSC hz in header also makes no sense here. Signed-off-by: Stephen Hemminger Acked-by: Hemant Agrawal --- app/proc-info/main.c | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 1623c3723b3e..6cf5bb4ea48a 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -660,8 +660,7 @@ show_port(void) uint16_t i = 0; int ret = 0, j, k; - snprintf(bdr_str, MAX_STRING_LEN, " show - Port PMD %"PRIu64, - rte_get_tsc_hz()); + snprintf(bdr_str, MAX_STRING_LEN, " show - Port PMD "); STATS_BDR_STR(10, bdr_str); RTE_ETH_FOREACH_DEV(i) { @@ -674,7 +673,7 @@ show_port(void) memset(&rss_conf, 0, sizeof(rss_conf)); - snprintf(bdr_str, MAX_STRING_LEN, " Port (%u)", i); + snprintf(bdr_str, MAX_STRING_LEN, " Port %u ", i); STATS_BDR_STR(5, bdr_str); printf(" - generic config\n"); @@ -758,8 +757,6 @@ show_port(void) } #endif } - - STATS_BDR_STR(50, ""); } static void @@ -845,8 +842,7 @@ show_tm(void) unsigned int j, k; uint16_t i = 0; - snprintf(bdr_str, MAX_STRING_LEN, " show - TM PMD %"PRIu64, - rte_get_tsc_hz()); + snprintf(bdr_str, MAX_STRING_LEN, " show - TM PMD "); STATS_BDR_STR(10, bdr_str); RTE_ETH_FOREACH_DEV(i) { @@ -1042,8 +1038,6 @@ show_tm(void) stats.leaf.n_bytes_dropped[RTE_COLOR_RED]); } } - - STATS_BDR_STR(50, ""); } static void @@ -1089,8 +1083,7 @@ show_crypto(void) { uint8_t crypto_dev_count = rte_cryptodev_count(), i; - snprintf(bdr_str, MAX_STRING_LEN, " show - CRYPTO PMD %"PRIu64, - rte_get_tsc_hz()); + snprintf(bdr_str, MAX_STRING_LEN, " show - CRYPTO PMD "); STATS_BDR_STR(10, bdr_str); for (i = 0; i < crypto_dev_count; i++) { @@ -1125,15 +1118,12 @@ show_crypto(void) stats.dequeue_err_count); } } - - STATS_BDR_STR(50, ""); } static void show_ring(char *name) { - snprintf(bdr_str, MAX_STRING_LEN, " show - RING %"PRIu64, - rte_get_tsc_hz()); + snprintf(bdr_str, MAX_STRING_LEN, " show - RING "); STATS_BDR_STR(10, bdr_str); if (name != NULL) { @@ -1164,7 +1154,6 @@ show_ring(char *name) } rte_ring_list_dump(stdout); - STATS_BDR_STR(50, ""); } static void @@ -1172,8 +1161,7 @@ show_mempool(char *name) { uint64_t flags = 0; - snprintf(bdr_str, MAX_STRING_LEN, " show - MEMPOOL %"PRIu64, - rte_get_tsc_hz()); + snprintf(bdr_str, MAX_STRING_LEN, " show - MEMPOOL "); STATS_BDR_STR(10, bdr_str); if (name != NULL) { @@ -1210,13 +1198,11 @@ show_mempool(char *name) rte_mempool_avail_count(ptr), rte_mempool_in_use_count(ptr)); - STATS_BDR_STR(50, ""); return; } } rte_mempool_list_dump(stdout); - STATS_BDR_STR(50, ""); } static void @@ -1234,8 +1220,7 @@ mempool_itr_obj(struct rte_mempool *mp, void *opaque, static void iter_mempool(char *name) { - snprintf(bdr_str, MAX_STRING_LEN, " iter - MEMPOOL %"PRIu64, - rte_get_tsc_hz()); + snprintf(bdr_str, MAX_STRING_LEN, " iter - MEMPOOL "); STATS_BDR_STR(10, bdr_str); if (name != NULL) { @@ -1245,12 +1230,9 @@ iter_mempool(char *name) uint32_t ret = rte_mempool_obj_iter(ptr, mempool_itr_obj, NULL); printf("\n - iterated %u objects\n", ret); - STATS_BDR_STR(50, ""); return; } } - - STATS_BDR_STR(50, ""); } int @@ -1351,8 +1333,5 @@ main(int argc, char **argv) if (ret) printf("Error from rte_eal_cleanup(), %d\n", ret); - strlcpy(bdr_str, " ", MAX_STRING_LEN); - STATS_BDR_STR(50, bdr_str); - return 0; } -- 2.27.0