From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo de Lara Subject: [PATCH] app/testpmd: disable latency stats by default Date: Tue, 2 May 2017 14:11:14 +0100 Message-ID: <1493730674-102633-1-git-send-email-pablo.de.lara.guarch@intel.com> Cc: dev@dpdk.org, Pablo de Lara To: jingjing@intel.com, reshma.pattan@intel.com 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) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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