Exemplo n.º 1
0
static int
worker_wrapper(void *arg)
{
	struct worker_data *w  = arg;
	const bool burst = evt_has_burst_mode(w->dev_id);

	if (burst)
		return order_queue_worker_burst(arg);
	else
		return order_queue_worker(arg);
}
Exemplo n.º 2
0
static int
worker_wrapper(void *arg)
{
	struct worker_data *w  = arg;
	struct evt_options *opt = w->t->opt;

	const bool burst = evt_has_burst_mode(w->dev_id);
	const int fwd_latency = opt->fwd_latency;

	/* allow compiler to optimize */
	if (!burst && !fwd_latency)
		return perf_atq_worker(arg, 0);
	else if (!burst && fwd_latency)
		return perf_atq_worker(arg, 1);
	else if (burst && !fwd_latency)
		return perf_atq_worker_burst(arg, 0);
	else if (burst && fwd_latency)
		return perf_atq_worker_burst(arg, 1);

	rte_panic("invalid worker\n");
}