[dpdk-dev] [PATCH 09/13] bbdev: measure offload cost

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Mon May 7 15:29:21 CEST 2018



> -----Original Message-----
> From: Chalupnik, KamilX
> Sent: Thursday, April 26, 2018 2:30 PM
> To: dev at dpdk.org
> Cc: Mokhtar, Amr <amr.mokhtar at intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch at intel.com>; Chalupnik, KamilX
> <kamilx.chalupnik at intel.com>
> Subject: [PATCH 09/13] bbdev: measure offload cost
> 

...

> --- a/lib/librte_bbdev/rte_bbdev.h
> +++ b/lib/librte_bbdev/rte_bbdev.h
> @@ -239,6 +239,10 @@ struct rte_bbdev_stats {
>  	uint64_t enqueue_err_count;
>  	/** Total error count on operations dequeued */
>  	uint64_t dequeue_err_count;
> +#ifdef RTE_TEST_BBDEV
> +	/** It stores offload time. */

Just "offload time" is fine.

> +	uint64_t offload_time;
> +#endif

Again, I don't think it is a good idea to have this compilation check.
RTE_TEST_BBDEV is used to enable the compilation of the test app,
so it shouldn't be used for anything else.
Also, in DPDK, we are avoiding the usage of this conditionals to enable/disable
pieces of code.

If you want to avoid the computation of this time, add a configuration option
in bbdev configuration structure (rte_bbdev_queue_conf?), so the decision is made at runtime.

>  };
> 
>  /**
> --
> 2.5.5



More information about the dev mailing list