diff options
author | Nithin Dabilpuram <ndabilpuram@marvell.com> | 2022-10-27 18:59:36 +0530 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2022-11-29 14:55:06 +0200 |
commit | dd67f2f3d12a3d3dc49756d778e016d7b5ea1c3c (patch) | |
tree | bea0500dff8559f62dde7a3484851c5191974783 /test | |
parent | bd4d058640bc51b0d413b4de44438c896cd437bc (diff) |
test: performance: fix odp_cpu_bench for 256 worker support
Fix cpu bench app to work when ODP platform supports more
worker threads than MAX_GROUPS * QUEUES_PER_GROUP.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/performance/odp_cpu_bench.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/performance/odp_cpu_bench.c b/test/performance/odp_cpu_bench.c index 41a26491f..e912e167d 100644 --- a/test/performance/odp_cpu_bench.c +++ b/test/performance/odp_cpu_bench.c @@ -26,7 +26,11 @@ /* Default number of entries in the test lookup table */ #define DEF_LOOKUP_TBL_SIZE (1024 * 1024) -#define MAX_WORKERS (ODP_THREAD_COUNT_MAX - 1) +#define MAX_WORKERS \ + (((ODP_THREAD_COUNT_MAX - 1) > (MAX_GROUPS * QUEUES_PER_GROUP)) ? \ + (MAX_GROUPS * QUEUES_PER_GROUP) : \ + (ODP_THREAD_COUNT_MAX - 1)) + ODP_STATIC_ASSERT(MAX_WORKERS <= MAX_GROUPS * QUEUES_PER_GROUP, "Not enough queues for all workers"); |