[PATCH v7 1/6] eventdev: introduce event pre-scheduling

Stephen Hemminger stephen at networkplumber.org
Sat Oct 5 18:11:35 CEST 2024


On Sat, 5 Oct 2024 13:29:56 +0530
<pbhagavatula at marvell.com> wrote:

> +static int
> +preschedule_test(enum rte_event_dev_preschedule_type preschedule_type, const char *preschedule_name)
> +{
> +#define NB_EVENTS     1024
> +	uint64_t start, total;
> +	struct rte_event ev;
> +	int rc, cnt;
> +
> +	ev.event_type = RTE_EVENT_TYPE_CPU;
> +	ev.queue_id = 0;
> +	ev.op = RTE_EVENT_OP_NEW;
> +	ev.u64 = 0xBADF00D0;
> +
> +	for (cnt = 0; cnt < NB_EVENTS; cnt++) {
> +		ev.flow_id = cnt;
> +		rc = rte_event_enqueue_burst(TEST_DEV_ID, 0, &ev, 1);
> +		TEST_ASSERT(rc == 1, "Failed to enqueue event");
> +	}
> +
> +	RTE_SET_USED(preschedule_type);

If you respin this patch. My preference is to use the __rte_unused attribute in the function
declaration rather RTE_SET_USED(), mainly because it makes it more obvious in the start of the function.


More information about the dev mailing list