From mboxrd@z Thu Jan 1 00:00:00 1970 From: Remy Horton Subject: [PATCH v7 6/6] app/test-pmd: add latency statistics calculation Date: Mon, 16 Jan 2017 16:19:33 +0000 Message-ID: <1484583573-30163-7-git-send-email-remy.horton@intel.com> References: <1484583573-30163-1-git-send-email-remy.horton@intel.com> Cc: Reshma Pattan , Thomas Monjalon To: dev@dpdk.org 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) In-Reply-To: <1484583573-30163-1-git-send-email-remy.horton@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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