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 49F25106A for ; Tue, 17 Jan 2017 12:45:24 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 17 Jan 2017 03:45:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,244,1477983600"; d="scan'208";a="1083961843" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by orsmga001.jf.intel.com with ESMTP; 17 Jan 2017 03:45:22 -0800 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.230]) by IRSMSX109.ger.corp.intel.com ([169.254.13.44]) with mapi id 14.03.0248.002; Tue, 17 Jan 2017 11:45:21 +0000 From: "Van Haaren, Harry" To: "Horton, Remy" , "dev@dpdk.org" CC: "Pattan, Reshma" , Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v7 6/6] app/test-pmd: add latency statistics calculation Thread-Index: AQHScBSQ1l6FR1+dikiKeFov/6dESqE8jUkA Date: Tue, 17 Jan 2017 11:45:20 +0000 Message-ID: References: <1484583573-30163-1-git-send-email-remy.horton@intel.com> <1484583573-30163-7-git-send-email-remy.horton@intel.com> In-Reply-To: <1484583573-30163-7-git-send-email-remy.horton@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzA4NWMwOGUtNzM4Ni00OTQ4LTlkZmQtNTc2YzE2ZjBiNTliIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ijd4VlZzcUVxTDR4Zkc0em9DRWNxempsWjAxamczSFpLU1RJOTVzV0krdjQ9In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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: Tue, 17 Jan 2017 11:45:24 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Remy Horton > Sent: Monday, January 16, 2017 4:20 PM > To: dev@dpdk.org > Cc: Pattan, Reshma ; Thomas Monjalon > Subject: [dpdk-dev] [PATCH v7 6/6] app/test-pmd: add latency statistics c= alculation >=20 > From: Reshma Pattan >=20 > Modify testpmd code to initialize/uninitialize latency statistics > calulation. >=20 > Signed-off-by: Reshma Pattan > Signed-off-by: Remy Horton Comment inline. > --- > app/test-pmd/testpmd.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) >=20 > 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 >=20 > #include "testpmd.h" >=20 > @@ -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 The 1 here represents reporting time in ns correct? 1 ns seems a very short= amount of time. Perhaps clarify (here or in the header) what exactly this number does, or s= et it to 0 for "as fast as possible"? >=20 > /* Setup bitrate stats */ > #ifdef RTE_LIBRTE_BITRATE > -- > 2.5.5