In case incorrect NUMA configuration, the current commit shares 1) either `source or destination numa is greater` 2) instead of `actual NUMA` it is `acture NUMA`
Current changes helps to rectify the same by using `PRINT_ERR` instead of printf. Signed-off-by: Vipin Varghese <vipin.vargh...@amd.com> Changes: - inform incorrect numa - fix spelling from acture to actual - use PRINT_ERR instead of printf --- --- app/test-dma-perf/benchmark.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/test-dma-perf/benchmark.c b/app/test-dma-perf/benchmark.c index 9b1f58c78c..b6d0dbe4c0 100644 --- a/app/test-dma-perf/benchmark.c +++ b/app/test-dma-perf/benchmark.c @@ -311,9 +311,14 @@ setup_memory_env(struct test_configure *cfg, struct rte_mbuf ***srcs, uint32_t nr_buf = cfg->nr_buf; nr_sockets = rte_socket_count(); - if (cfg->src_numa_node >= nr_sockets || - cfg->dst_numa_node >= nr_sockets) { - printf("Error: Source or destination numa exceeds the acture numa nodes.\n"); + + bool isSrcNumaIncorrect = (cfg->src_numa_node >= nr_sockets); + bool isDstNumaIncorrect = (cfg->dst_numa_node >= nr_sockets); + + if (isSrcNumaIncorrect || isDstNumaIncorrect) { + PRINT_ERR("Error: NUMA config exceeds the actual numa nodes for %s.\n", + (isSrcNumaIncorrect && isDstNumaIncorrect) ? "Source & Destination" : + (isSrcNumaIncorrect) ? "Source" : "Destination"); return -1; } -- 2.39.3