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 F0419A0526; Tue, 21 Jul 2020 20:23:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7EC811C05C; Tue, 21 Jul 2020 20:22:58 +0200 (CEST) Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id BB5C01C031 for ; Tue, 21 Jul 2020 20:22:55 +0200 (CEST) Received: by mail-pl1-f195.google.com with SMTP id p1so10624794pls.4 for ; Tue, 21 Jul 2020 11:22:55 -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=1iSNtlfJy6gteAYsSYrqpxFpYkOwC+ZDBEYUD2FQ/IY=; b=HwW8Tms4owyW7p0xl9abIL9TJcL4Wy2Hz8QJl2IYQnHBGJZMfvsB5+zsx1ERk+WIAr EJRL4wPkj3I+ANm8i/VWHkHOx08jdTnuBq4/QwLeWknBr5c504kLJ3OyOqPiVC1LA6Vo vU2tUXCpXdsKl78WMs3QQVp4fKcgU54OfvmSDvW+4grWAEv7dGVW5hrqXZALxFKHTr7R AzIWPjpAn6A9JwkHxqk9X58EuIGPln3BcfgBecIRUNYP3dELdlu0pjeZHBa0bPMOKvq7 NmSVC9paS3nMY8WKLuCTUlCykmy0OpyxF5iugIhZ1jTCj0FfRN71D6KpmBOGRpvfDzXl Rpmg== 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=1iSNtlfJy6gteAYsSYrqpxFpYkOwC+ZDBEYUD2FQ/IY=; b=MVDx46fSDFWKklVwzCFg60l/zUmO1JFGc9sxlzzX9ggg71mh+JQFfCF0pIFwdSZQJB 6/0HWu+OeIr8KlvsnZLMcms1nwK4mH54gqnzkDCXuv4qK2Sjns1u/4kija+k7YvWE6cB akBMP4SoMlHaJ/PmmXN7W/0qlVlIyeSbSiQjVN+6T3Y1vAto8rGnZAvmmYpbzbHM4Er8 o1PZZvT3nTnAfH2NTvNFs4xpzdNKNPkFi19z0RwxXhXUeyt4jTE/lPpadHjuM4jyVFRQ 5F6oQkAd554e1d1KrXoCCw1yJoVae2O89rFP5Bg0BlK7HOyuryyJGrOuDYcQdmwDr3WT exJg== X-Gm-Message-State: AOAM530gjbbAq0h+OvErUv4+3KmwH+hDai6Zd/rfRBMlhxOs6vFy3P3f 0ys2pqQOuxQRI+KOExtbpD7RVrYMnorIBg== X-Google-Smtp-Source: ABdhPJxnLqLX3FJnBzk+kceYgKdBWzNQvrNdgBKrAv3FhxQCf1BKyX+gipeEJ0uu9ELEPxGg++upjg== X-Received: by 2002:a17:90a:f996:: with SMTP id cq22mr6655232pjb.208.1595355774418; Tue, 21 Jul 2020 11:22:54 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 11:22:53 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Hemant Agrawal Date: Tue, 21 Jul 2020 11:22:36 -0700 Message-Id: <20200721182242.5366-3-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 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 2/8] 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 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.27.0