[dpdk-dev] [PATCH v2] app/testpmd: add bitrate stats option

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Tue May 2 13:18:52 CEST 2017



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas at monjalon.net]
> Sent: Monday, May 01, 2017 9:22 PM
> To: Patil, Harish; Horton, Remy
> Cc: dev at dpdk.org; De Lara Guarch, Pablo; Wu, Jingjing
> Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: add bitrate stats option
> 
> 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.
> 
> Yes, the default config of testpmd must give good performance.
> 
> > So can we disable this feature by default in the config?
> > *         CONFIG_RTE_LIBRTE_BITRATE=n
> > *         CONFIG_RTE_LIBRTE_LATENCY_STATS=n
> > Only those folks interested in latency/jitter measurements can recompile
> > with those configs enabled.
> 
> I disagree about compile-time options.
> It should be a run-time option of testpmd.
> 
> 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 = 0; sm_id < nb_fs; sm_id++)
                        (*pkt_fwd)(fsm[sm_id]);
#ifdef RTE_LIBRTE_BITRATE
                if (bitrate_enabled != 0 &&
                                bitrate_lcore_id == rte_lcore_id()) {
                        tics_current = rte_rdtsc();
                        if (tics_current - tics_datum >= tics_per_1sec) {

Unless --bitrate-stats is used, bitrate_enabled = 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 == rte_lcore_id())


Thanks,
Pablo


More information about the dev mailing list