From mboxrd@z Thu Jan 1 00:00:00 1970 From: "De Lara Guarch, Pablo" Subject: Re: [PATCH v2] app/testpmd: add bitrate stats option Date: Tue, 2 May 2017 11:18:52 +0000 Message-ID: References: <1493211774-28249-1-git-send-email-remy.horton@intel.com> <1493377213-156955-1-git-send-email-pablo.de.lara.guarch@intel.com> <1984316.gczFh5jcb3@xps> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" , "Wu, Jingjing" To: Thomas Monjalon , "Patil, Harish" , "Horton, Remy" Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 9BF54374E for ; Tue, 2 May 2017 13:18:55 +0200 (CEST) In-Reply-To: <1984316.gczFh5jcb3@xps> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Monday, May 01, 2017 9:22 PM > To: Patil, Harish; Horton, Remy > Cc: dev@dpdk.org; De Lara Guarch, Pablo; Wu, Jingjing > Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: add bitrate stats option >=20 > 01/05/2017 22:07, Patil, Harish: > > Hi Remy, > > Have a small suggestion here. > > Since testpmd uses new libraries of librte_latencystats and > > librte_bitratestats it hurts packet processing performance. > > Many users who use testpmd to do the initial performance benchmarks > may > > not be aware of such a feature is default enabled. >=20 > Yes, the default config of testpmd must give good performance. >=20 > > So can we disable this feature by default in the config? > > * CONFIG_RTE_LIBRTE_BITRATE=3Dn > > * CONFIG_RTE_LIBRTE_LATENCY_STATS=3Dn > > Only those folks interested in latency/jitter measurements can recompil= e > > with those configs enabled. >=20 > I disagree about compile-time options. > It should be a run-time option of testpmd. >=20 > Please Remy (or others), > disable the metrics in the default configuration of testpmd, > before the 17.05 release. > You have few days, it is urgent. Bitrate stats are disabled by default, in testpmd. I assume that the code that you want to avoid is: for (sm_id =3D 0; sm_id < nb_fs; sm_id++) (*pkt_fwd)(fsm[sm_id]); #ifdef RTE_LIBRTE_BITRATE if (bitrate_enabled !=3D 0 && bitrate_lcore_id =3D=3D rte_lcore_id()) { tics_current =3D rte_rdtsc(); if (tics_current - tics_datum >=3D tics_per_1sec) { Unless --bitrate-stats is used, bitrate_enabled =3D 0, so all this code won= 't be run. I can send a patch to check the latencystats_enabled flag first, following = the approach above, here: #ifdef RTE_LIBRTE_LATENCY_STATS if (latencystats_lcore_id =3D=3D rte_lcore_id()) Thanks, Pablo