[dpdk-dev] [PATCH 2/4] app/eventdev: add burst mode for event timer adapter

Carrillo, Erik G erik.g.carrillo at intel.com
Fri Mar 30 21:54:40 CEST 2018


Hi Pavan,

One comment in-line:

> -----Original Message-----
> From: Pavan Nikhilesh [mailto:pbhagavatula at caviumnetworks.com]
> Sent: Sunday, March 18, 2018 8:12 AM
> To: jerin.jacob at caviumnetworks.com;
> santosh.shukla at caviumnetworks.com; Carrillo, Erik G
> <erik.g.carrillo at intel.com>
> Cc: dev at dpdk.org; Pavan Nikhilesh <pbhagavatula at caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH 2/4] app/eventdev: add burst mode for event
> timer adapter
> 
> Add burst mode for event timer adapter that can be selected by passing --
> prod_type_timerdev_burst.
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula at caviumnetworks.com>
> ---

<...snipped...> 

> diff --git a/app/test-eventdev/test_perf_common.c b/app/test-
> eventdev/test_perf_common.c
> index 6ae146d91..072b5f8cf 100644
> --- a/app/test-eventdev/test_perf_common.c
> +++ b/app/test-eventdev/test_perf_common.c
> @@ -128,6 +128,61 @@ perf_event_timer_producer(void *arg)
>  	return 0;
>  }
> 
> +static inline int
> +perf_event_timer_producer_burst(void *arg) {
> +	int i;
> +	struct prod_data *p  = arg;
> +	struct test_perf *t = p->t;
> +	struct evt_options *opt = t->opt;
> +	uint32_t flow_counter = 0;
> +	uint64_t count = 0;
> +	uint64_t arm_latency = 0;
> +	const uint8_t nb_timer_adptrs = opt->nb_timer_adptrs;
> +	const uint32_t nb_flows = t->nb_flows;
> +	const uint64_t nb_timers = opt->nb_timers;
> +	struct rte_mempool *pool = t->pool;
> +	struct perf_elt *m[BURST_SIZE + 1] = {NULL};
> +	struct rte_event_timer_adapter **adptr = t->timer_adptr;
> +	const struct rte_event_timer tim = {
> +		.ev.op = RTE_EVENT_OP_NEW,
> +		.ev.queue_id = p->queue_id,
> +		.ev.sched_type = t->opt->sched_type_list[0],
> +		.ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
> +		.ev.event_type =  RTE_EVENT_TYPE_TIMER,
> +		.timeout_ticks = (opt->nb_bkt_tcks * opt->bkt_tck_nsec) /
> +			opt->optm_bkt_tck_nsec,
> +	};

We should also initialize .state = RTE_EVENT_TIMER_NOT_ARMED here.  Also, if we decide to use the ceiling of the fraction in the prior patch, then the same would apply here.

Thanks,
Gabriel



More information about the dev mailing list