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 5935EA034E; Wed, 6 May 2020 21:58:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7F42E1DB04; Wed, 6 May 2020 21:58:12 +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 BF4501DAED for ; Wed, 6 May 2020 21:58:10 +0200 (CEST) Received: by mail-pl1-f193.google.com with SMTP id x10so998679plr.4 for ; Wed, 06 May 2020 12:58:10 -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=cVRlYW3K6vMtAg8xTdMb9RsDGBkkeKSa9AAsYVZ8BBo=; b=jb4PMSEmZn9TfkxRvcCtFBW7xy4bRbn0750HiV0rVHmEjLVMv9oevKE98wPWjdxU4H 3U9Zp/TZ1YbArPHcb8j8OjRNBZfxtXv6VUc8jPKfUlBX+xgO0PqKosfGktBiLGlVAYGu wiNl92OEn+iiE1bnJyqhT+lHGv0f7zZJze4T1H6HjB+uAGeaPeVt0c7OeEXv60Rgn7P7 PEkXzq8iSpCq8qoNBK6b1TJiMCxoEVI9DuZY/6CQoEU6clKET7Eq+WFwMgnH67d5tWpl YouamDJZIpzKIkOymwTQ6CLl2O2t/4uelOrxbsRzvFH+dguqDrB0a/69vPqOM3WWdovY A/3g== 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=cVRlYW3K6vMtAg8xTdMb9RsDGBkkeKSa9AAsYVZ8BBo=; b=DPNs7Zsph52fl9g97iAdMxl2FQZyhogU1zIb1FAKLs2/RdaoPTBGPemiIBgaLbWiTm 1uyDVTIec8tK38AGdbPQcXP8vqG42hAA+QpIte7cpTxgqvCOQW/JIHEnMNGtP9g9LRuB 4pISBLO3f6AClJfSpJ6J9oe6l/RLyGrdW5DoKQI1XRy+0+R8tUjF23nfRUc+EQrtUkTr 323I7pF1zYZJ95k9byfU2r+1Ft0+QTsmzGqz58AOkcNrJKTYktBc7Z6fTOJ6Q0FCUWa0 sKOgk6fi/1lebHYQ5PXheS+mDAZYhlXl/dm4wnJjKqz1U6U0MkkEBCOUHSVdkLhP6xtR fQ9w== X-Gm-Message-State: AGi0PuZ5EsUxR6fe9koAktR0Sm1x4EDPMrF/x5DNwljrzTZhd5s4YoE1 ff+Msjtig+QmN3XX2OpPdn9B6OGNuvE8TQ== X-Google-Smtp-Source: APiQypIxqBoeCGbd2qpI/AhucQm+Z7ScHq6/IAC2p0fvzoMLXufGHe2sJGlgUzqNI6s4HphKZArdSA== X-Received: by 2002:a17:90a:1464:: with SMTP id j91mr10400047pja.87.1588795089363; Wed, 06 May 2020 12:58:09 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id w1sm2126238pgh.53.2020.05.06.12.58.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 12:58:08 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Maryam Tahhan , Reshma Pattan Date: Wed, 6 May 2020 12:57:53 -0700 Message-Id: <20200506195758.27057-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200506195758.27057-1-stephen@networkplumber.org> References: <20200506193741.24117-1-stephen@networkplumber.org> <20200506195758.27057-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 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 --- 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