[dpdk-dev] [PATCH v12 4/6] app/test-pmd: add bitrate	statistics	calculation
    Pattan, Reshma 
    reshma.pattan at intel.com
       
    Tue Mar 28 17:49:41 CEST 2017
    
    
  
> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Remy Horton
> Sent: Monday, March 27, 2017 9:22 PM
> To: dev at dpdk.org
> Cc: Thomas Monjalon <thomas.monjalon at 6wind.com>
> Subject: [dpdk-dev] [PATCH v12 4/6] app/test-pmd: add bitrate statistics
> calculation
> 
> ---
>  app/test-pmd/testpmd.c | 41
> ++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 40 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
> e04e215..72a7181 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -1,7 +1,7 @@
> +#ifdef RTE_LIBRTE_BITRATE
> +	uint64_t tics_per_1sec;
> +	uint64_t tics_datum;
> +	uint64_t tics_current;
> +	uint8_t idx_port, cnt_ports;
> +#endif
> 
The above lines and below lines can be combined in one ifdef, endif
> +#ifdef RTE_LIBRTE_BITRATE
> +	cnt_ports = rte_eth_dev_count();
> +	tics_datum = rte_rdtsc();
> +	tics_per_1sec = rte_get_timer_hz();
> +#endif
    
    
More information about the dev
mailing list