From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 32A972E8B for ; Mon, 16 Jan 2017 17:19:43 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 16 Jan 2017 08:19:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,239,1477983600"; d="scan'208";a="809499589" Received: from rhorton-mobl.ger.corp.intel.com (HELO VM.ir.intel.com) ([163.33.230.196]) by FMSMGA003.fm.intel.com with ESMTP; 16 Jan 2017 08:19:40 -0800 From: Remy Horton To: dev@dpdk.org Cc: Reshma Pattan , Thomas Monjalon Date: Mon, 16 Jan 2017 16:19:33 +0000 Message-Id: <1484583573-30163-7-git-send-email-remy.horton@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1484583573-30163-1-git-send-email-remy.horton@intel.com> References: <1484583573-30163-1-git-send-email-remy.horton@intel.com> Subject: [dpdk-dev] [PATCH v7 6/6] app/test-pmd: add latency statistics calculation 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: Mon, 16 Jan 2017 16:19:43 -0000 From: Reshma Pattan Modify testpmd code to initialize/uninitialize latency statistics calulation. Signed-off-by: Reshma Pattan Signed-off-by: Remy Horton --- app/test-pmd/testpmd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index a0b7430..2874ce4 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -83,6 +83,10 @@ #ifdef RTE_LIBRTE_BITRATE #include #endif +#include +#ifdef RTE_LIBRTE_LATENCY_STATS +#include +#endif #include "testpmd.h" @@ -2108,6 +2112,9 @@ signal_handler(int signum) /* uninitialize packet capture framework */ rte_pdump_uninit(); #endif +#ifdef RTE_LIBRTE_LATENCY_STATS + rte_latencystats_uninit(); +#endif force_quit(); /* exit with the expected status */ signal(signum, SIG_DFL); @@ -2165,6 +2172,9 @@ main(int argc, char** argv) /* set all ports to promiscuous mode by default */ FOREACH_PORT(port_id, ports) rte_eth_promiscuous_enable(port_id); +#ifdef RTE_LIBRTE_LATENCY_STATS + rte_latencystats_init(1, NULL); +#endif /* Setup bitrate stats */ #ifdef RTE_LIBRTE_BITRATE -- 2.5.5