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 80911A0548; Wed, 15 Jul 2020 23:22:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 214C91BDAC; Wed, 15 Jul 2020 23:22:43 +0200 (CEST) Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by dpdk.org (Postfix) with ESMTP id 085691B13C for ; Wed, 15 Jul 2020 23:22:40 +0200 (CEST) Received: by mail-pj1-f68.google.com with SMTP id t15so3612159pjq.5 for ; Wed, 15 Jul 2020 14:22:39 -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=OF/d/UfxBd1EiHgw+7gCoEjfU7qPDg/e9BhIKUC7ohuZ7Deg2p1dQhtA6dEAvcT6Uk VWMGS1pSdgnfgdhqdcrlzIrUcPOubfX/g84q35XQdq/YRjTDYocS79tVkprgv1GpvLoa KG5E2jUo6pz1fBG0na3eG3njl2Hp2sNdikx4pBEIVow3VTMLDK9sVwxY3TMw2a8E8K48 JLxIlOPdbdUjZp4uOi3KhuOXLKIhk2Waxy9fyl3Du7Ozu5RxbrDnf8ZWFdvMem2mRmU5 aaipjkGIsZnTeYuaj3tsL4OQf2979PhmuAGhcJFLu3b+T8QoEzAvwN+h/ZzTwmReMvTa L4gg== 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=Z7WwYXVRg1V0zXGzOIFniY6cJ0Wu4dwVWPpFfXZJOejrcMpegS936M4/LmvMTpmACD fTkvpn5szuJTvusxZHqS2/DRZX03daLaCZlwz6GkFRweLIzPEfbJfc0akR44HpS3bTgf TPrkJDDmLIy0xmd0aqfkpc8FuhS0i6N/pfmxr7QV6bQF9GEieL3nc469g7yx3/hPWPvW 5sr2JrxTZpPYX5I+nz2jrs/vyzLpYnooCc38T7al36/fYN/cuQDRYt8nqRoOD0fteh2T f/he+BtsT+oCE16BNvySniqzJ5ory2WSSd+bgXDvdFcbwb5Sjxb7NaZNsRs8o7RJbLRL HvEw== X-Gm-Message-State: AOAM531wMxAs3MdDaQVF0LiupZmD+xnqEm2eb+wIJpOIgjFJdoiUNTrU 1LLL2vdWaKQXswEFRCgfZkfJXw== X-Google-Smtp-Source: ABdhPJwmrBj0Cv3dXalSUuNFj7rYIgtrjDeocPFnuhnAXpegRInohV/FkTok6mJQro/l/MQVWluHuw== X-Received: by 2002:a17:90a:ce09:: with SMTP id f9mr1729104pju.55.1594848159152; Wed, 15 Jul 2020 14:22:39 -0700 (PDT) Received: from hermes.corp.microsoft.com (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id s89sm2932600pjj.28.2020.07.15.14.22.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2020 14:22:38 -0700 (PDT) From: Stephen Hemminger To: maryam.tahhan@intel.com, reshma.pattan@intel.com, hemant.agrawal@nxp.com Cc: dev@dpdk.org, Stephen Hemminger Date: Wed, 15 Jul 2020 14:22:23 -0700 Message-Id: <20200715212228.28010-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200715212228.28010-1-stephen@networkplumber.org> References: <20200506193741.24117-1-stephen@networkplumber.org> <20200715212228.28010-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 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 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