DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Maryam Tahhan <maryam.tahhan@intel.com>,
	Reshma Pattan <reshma.pattan@intel.com>
Subject: [dpdk-dev] [PATCH v2 2/7] app/proc-info: eliminate useless borders
Date: Wed,  6 May 2020 12:57:53 -0700
Message-ID: <20200506195758.27057-3-stephen@networkplumber.org> (raw)
In-Reply-To: <20200506195758.27057-1-stephen@networkplumber.org>

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 <stephen@networkplumber.org>
---
 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 69e3000616c0..049818bad51f 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) {
@@ -673,7 +672,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");
 
@@ -754,8 +753,6 @@ show_port(void)
 		}
 #endif
 	}
-
-	STATS_BDR_STR(50, "");
 }
 
 static void
@@ -841,8 +838,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) {
@@ -1038,8 +1034,6 @@ show_tm(void)
 				stats.leaf.n_bytes_dropped[RTE_COLOR_RED]);
 		}
 	}
-
-	STATS_BDR_STR(50, "");
 }
 
 static void
@@ -1085,8 +1079,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++) {
@@ -1121,15 +1114,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) {
@@ -1160,7 +1150,6 @@ show_ring(char *name)
 	}
 
 	rte_ring_list_dump(stdout);
-	STATS_BDR_STR(50, "");
 }
 
 static void
@@ -1168,8 +1157,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) {
@@ -1206,13 +1194,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
@@ -1230,8 +1216,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) {
@@ -1241,12 +1226,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
@@ -1347,8 +1329,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.20.1


  parent reply	other threads:[~2020-05-06 19:58 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06 19:37 [dpdk-dev] [PATCH 0/7] proc-info enhancements Stephen Hemminger
2020-05-06 19:37 ` [dpdk-dev] [PATCH 1/7] app/proc-info: remove unused logtype #define Stephen Hemminger
2020-05-06 19:37 ` [dpdk-dev] [PATCH 2/7] app/proc-info: eliminate useless borders Stephen Hemminger
2020-05-06 19:37 ` [dpdk-dev] [PATCH 3/7] app/proc-info: hide EAL info messages Stephen Hemminger
2020-05-06 19:37 ` [dpdk-dev] [PATCH 4/7] app/proc-info: add more info to show_ports Stephen Hemminger
2020-05-06 19:37 ` [dpdk-dev] [PATCH 5/7] app/proc-info: hide crypto-context display Stephen Hemminger
2020-05-06 19:37 ` [dpdk-dev] [PATCH 6/7] app/proc-info: dump rx and tx descriptor info Stephen Hemminger
2020-05-06 19:37 ` [dpdk-dev] [PATCH 7/7] app/proc-info: provide way to request info on owned ports Stephen Hemminger
2020-05-06 19:57 ` [dpdk-dev] [PATCH v2 0/7] app/proc-info enhancements Stephen Hemminger
2020-05-06 19:57   ` [dpdk-dev] [PATCH v2 1/7] app/proc-info: remove unused logtype #define Stephen Hemminger
2020-05-06 19:57   ` Stephen Hemminger [this message]
2020-05-06 19:57   ` [dpdk-dev] [PATCH v2 3/7] app/proc-info: hide EAL info messages Stephen Hemminger
2020-05-06 19:57   ` [dpdk-dev] [PATCH v2 4/7] app/proc-info: add more info to show_ports Stephen Hemminger
2020-07-13 12:09     ` Hemant Agrawal
2020-05-06 19:57   ` [dpdk-dev] [PATCH v2 5/7] app/proc-info: hide crypto-context display Stephen Hemminger
2020-05-06 19:57   ` [dpdk-dev] [PATCH v2 6/7] app/proc-info: dump rx and tx descriptor info Stephen Hemminger
2020-07-13 12:08     ` Hemant Agrawal
2020-05-06 19:57   ` [dpdk-dev] [PATCH v2 7/7] app/proc-info: provide way to request info on owned ports Stephen Hemminger
2020-07-13 12:10   ` [dpdk-dev] [PATCH v2 0/7] app/proc-info enhancements Hemant Agrawal
2020-07-15 21:22 ` [dpdk-dev] [PATCH v3 0/7] app/proc-info enhancments Stephen Hemminger
2020-07-15 21:22   ` [dpdk-dev] [PATCH v3 1/7] app/proc-info: remove unused logtype #define Stephen Hemminger
2020-07-15 21:22   ` [dpdk-dev] [PATCH v3 2/7] app/proc-info: eliminate useless borders Stephen Hemminger
2020-07-17 14:06     ` Thomas Monjalon
2020-08-13  4:10       ` Varghese, Vipin
2020-08-13 16:11         ` Stephen Hemminger
2020-08-14  0:45           ` Varghese, Vipin
2020-08-14  1:14             ` Varghese, Vipin
2020-08-14  3:18               ` Stephen Hemminger
2020-08-14 11:08                 ` Varghese, Vipin
2020-08-14 14:56                   ` Stephen Hemminger
2020-08-15  2:48                     ` Varghese, Vipin
2020-07-15 21:22   ` [dpdk-dev] [PATCH v3 3/7] app/proc-info: hide EAL info messages Stephen Hemminger
2020-07-17 14:04     ` Thomas Monjalon
2020-07-15 21:22   ` [dpdk-dev] [PATCH v3 4/7] app/proc-info: add more info to show_ports Stephen Hemminger
2020-07-15 21:22   ` [dpdk-dev] [PATCH v3 5/7] app/proc-info: dump rx and tx descriptor info Stephen Hemminger
2020-07-15 21:22   ` [dpdk-dev] [PATCH v3 6/7] app/proc-info: provide way to request info on owned ports Stephen Hemminger
2020-07-17 15:01     ` Thomas Monjalon
2020-07-21 17:05       ` Stephen Hemminger
2020-07-21 17:08         ` Thomas Monjalon
2020-07-21 17:37           ` Stephen Hemminger
2020-07-15 21:22   ` [dpdk-dev] [PATCH v3 7/7] app/proc-info: add crypto security context info Stephen Hemminger
2020-07-21 18:22 ` [dpdk-dev] [PATCH v4 0/8] app/proc-info enhancements Stephen Hemminger
2020-07-21 18:22   ` [dpdk-dev] [PATCH v4 1/8] app/proc-info: remove unused logtype #define Stephen Hemminger
2020-07-21 18:22   ` [dpdk-dev] [PATCH v4 2/8] app/proc-info: eliminate useless borders Stephen Hemminger
2020-07-21 18:22   ` [dpdk-dev] [PATCH v4 3/8] app/proc-info: hide EAL info messages Stephen Hemminger
2020-07-21 18:22   ` [dpdk-dev] [PATCH v4 4/8] app/proc-info: add more info to show_ports Stephen Hemminger
2020-07-28  7:22     ` Hemant Agrawal (OSS)
2020-07-21 18:22   ` [dpdk-dev] [PATCH v4 5/8] app/proc-info: enhance mempool to print ops name Stephen Hemminger
2020-07-21 18:22   ` [dpdk-dev] [PATCH v4 6/8] app/proc-info: dump rx and tx descriptor info Stephen Hemminger
2020-07-21 18:22   ` [dpdk-dev] [PATCH v4 7/8] app/proc-info: add crypto security context info Stephen Hemminger
2020-07-21 18:22   ` [dpdk-dev] [PATCH v4 8/8] app/proc-info: provide way to request info on owned ports Stephen Hemminger
2020-07-28  5:39     ` Hemant Agrawal (OSS)
2020-07-28  5:45       ` Stephen Hemminger
2020-07-28 19:13 ` [dpdk-dev] [PATCH v5 0/8] app/proc-info enhancements Stephen Hemminger
2020-07-28 19:13   ` [dpdk-dev] [PATCH v5 1/8] app/proc-info: remove unused logtype #define Stephen Hemminger
2020-07-28 19:13   ` [dpdk-dev] [PATCH v5 2/8] app/proc-info: eliminate useless borders Stephen Hemminger
2020-07-28 19:13   ` [dpdk-dev] [PATCH v5 3/8] app/proc-info: hide EAL info messages Stephen Hemminger
2020-07-28 19:13   ` [dpdk-dev] [PATCH v5 4/8] app/proc-info: add more info to show_ports Stephen Hemminger
2020-07-28 19:13   ` [dpdk-dev] [PATCH v5 5/8] app/proc-info: enhance mempool to print ops name Stephen Hemminger
2020-07-28 19:13   ` [dpdk-dev] [PATCH v5 6/8] app/proc-info: dump rx and tx descriptor info Stephen Hemminger
2020-07-28 19:13   ` [dpdk-dev] [PATCH v5 7/8] app/proc-info: add crypto security context info Stephen Hemminger
2020-07-28 19:13   ` [dpdk-dev] [PATCH v5 8/8] app/proc-info: provide way to request info on owned ports Stephen Hemminger
2020-09-18 22:12   ` [dpdk-dev] [PATCH v5 0/8] app/proc-info enhancements Stephen Hemminger
2020-09-24  5:34   ` [dpdk-dev] [PATCH v6 0/7] app/proc-info: enhancements Stephen Hemminger
2020-09-24  5:34     ` [dpdk-dev] [PATCH v6 1/7] app/proc-info: remove unused logtype #define Stephen Hemminger
2020-09-24  5:34     ` [dpdk-dev] [PATCH v6 2/7] app/proc-info: eliminate useless borders Stephen Hemminger
2020-09-24  5:34     ` [dpdk-dev] [PATCH v6 3/7] app/proc-info: hide EAL info messages Stephen Hemminger
2020-09-24  5:34     ` [dpdk-dev] [PATCH v6 4/7] app/proc-info: add more info to show_ports Stephen Hemminger
2020-09-24  5:34     ` [dpdk-dev] [PATCH v6 5/7] app/proc-info: dump rx and tx descriptor info Stephen Hemminger
2020-09-24  5:34     ` [dpdk-dev] [PATCH v6 6/7] app/proc-info: add crypto security context info Stephen Hemminger
2020-09-24  5:34     ` [dpdk-dev] [PATCH v6 7/7] app/proc-info: provide way to request info on owned ports Stephen Hemminger
2020-10-19 22:39     ` [dpdk-dev] [PATCH v6 0/7] app/proc-info: enhancements Thomas Monjalon
2020-08-12  0:52 ` [dpdk-dev] [PATCH 0/7] proc-info enhancements Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200506195758.27057-3-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=maryam.tahhan@intel.com \
    --cc=reshma.pattan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git