From a0193a715bec96b594d2dc90314079f0e858870e Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Tue, 19 Nov 2024 14:42:03 +0200 Subject: [PATCH] test: sched_latency: check queue count capability Check capability for the number of created queues. Signed-off-by: Matias Elo --- test/performance/odp_sched_latency.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/performance/odp_sched_latency.c b/test/performance/odp_sched_latency.c index 3bf1358e39..01772671a2 100644 --- a/test/performance/odp_sched_latency.c +++ b/test/performance/odp_sched_latency.c @@ -851,6 +851,7 @@ static int calc_queue_sizes(test_globals_t *globals, uint32_t queue_size[]) odp_schedule_capability_t capa; test_args_t *args = &globals->args; const uint32_t min_queue_size = 256; + uint32_t tot_queues = 0; if (odp_schedule_capability(&capa)) { ODPH_ERR("Schedule capability failed\n"); @@ -879,6 +880,13 @@ static int calc_queue_sizes(test_globals_t *globals, uint32_t queue_size[]) capa.max_queue_size); queue_size[i] = capa.max_queue_size; } + tot_queues += queues; + } + + if (tot_queues > capa.max_queues) { + ODPH_ERR("Requested %" PRIu32 " queues, max %" PRIu32 " supported\n", + tot_queues, capa.max_queues); + return -1; } return 0;