From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 27ED3377E for ; Tue, 2 May 2017 15:11:02 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 May 2017 06:11:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,405,1488873600"; d="scan'208";a="852005155" Received: from silpixa00381631.ir.intel.com (HELO silpixa00381631.ger.corp.intel.com) ([10.237.222.122]) by FMSMGA003.fm.intel.com with ESMTP; 02 May 2017 06:11:00 -0700 From: Pablo de Lara To: jingjing@intel.com, reshma.pattan@intel.com Cc: dev@dpdk.org, Pablo de Lara Date: Tue, 2 May 2017 14:11:14 +0100 Message-Id: <1493730674-102633-1-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] app/testpmd: disable latency stats by default 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: , X-List-Received-Date: Tue, 02 May 2017 13:11:03 -0000 Disable latency stats gathering by default, so there is not performance degradation if user is not interested in them. Signed-off-by: Pablo de Lara --- app/test-pmd/testpmd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index dfe6442..23dfdb0 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -971,7 +971,8 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd) } #endif #ifdef RTE_LIBRTE_LATENCY_STATS - if (latencystats_lcore_id == rte_lcore_id()) + if (latencystats_enabled != 0 && + latencystats_lcore_id == rte_lcore_id()) rte_latencystats_update(); #endif @@ -2238,8 +2239,9 @@ main(int argc, char** argv) rte_panic("Empty set of forwarding logical cores - check the " "core mask supplied in the command parameters\n"); - /* Bitrate stats disabled by default */ + /* Bitrate/latency stats disabled by default */ bitrate_enabled = 0; + latencystats_enabled = 0; argc -= diag; argv += diag; -- 2.7.4