diff options
author | Petri Savolainen <petri.savolainen@nokia.com> | 2019-07-03 11:22:42 +0300 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2019-07-03 16:00:21 +0300 |
commit | a8fca1ed79b6e5173c14fdfff43ff5460f61ef68 (patch) | |
tree | 8a9cd24443cc3c4207b08ce3f67b891410e6a7e3 /test/performance/odp_sched_perf.c | |
parent | 6d23501cc7d67d9903efcc2c288276b79eef5044 (diff) |
test: fix pool capability check
Max_num capability value of zero means that only memory size
limits the pool size.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Stanislaw Kardach <skardach@marvell.com>
Diffstat (limited to 'test/performance/odp_sched_perf.c')
-rw-r--r-- | test/performance/odp_sched_perf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/performance/odp_sched_perf.c b/test/performance/odp_sched_perf.c index c301263ef..65cf63bb9 100644 --- a/test/performance/odp_sched_perf.c +++ b/test/performance/odp_sched_perf.c @@ -200,6 +200,7 @@ static int create_pool(test_global_t *global) odp_pool_capability_t pool_capa; odp_pool_param_t pool_param; odp_pool_t pool; + uint32_t max_num; test_options_t *test_options = &global->test_options; uint32_t num_cpu = test_options->num_cpu; uint32_t num_queue = test_options->num_queue; @@ -229,8 +230,10 @@ static int create_pool(test_global_t *global) return -1; } - if (tot_event > pool_capa.buf.max_num) { - printf("Max events supported %u\n", pool_capa.buf.max_num); + max_num = pool_capa.buf.max_num; + + if (max_num && tot_event > max_num) { + printf("Error: max events supported %u\n", max_num); return -1; } |