[PATCH] app/dma-perf: calrify incorrect NUMA config

fengchengwen fengchengwen at huawei.com
Thu Mar 7 14:19:08 CET 2024


Hi Vipin,

On 2024/3/6 23:02, Vipin Varghese wrote:
> Current commit decalres either `source or destination numa is greater
> than acture numa` as cause of error. Rephrase as `Source or Destination`
> is incorrect numa by checking which is greater than available numa.
> 
> Signed-off-by: Vipin Varghese <vipin.varghese at amd.com>
> ---
>  app/test-dma-perf/benchmark.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test-dma-perf/benchmark.c b/app/test-dma-perf/benchmark.c
> index 9b1f58c78c..5634ff8bf8 100644
> --- a/app/test-dma-perf/benchmark.c
> +++ b/app/test-dma-perf/benchmark.c
> @@ -313,7 +313,8 @@ setup_memory_env(struct test_configure *cfg, struct rte_mbuf ***srcs,
>  	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");
> +		printf("Error: %s numa exceeds the available numa nodes.\n",
> +				(cfg->src_numa_node >= nr_sockets) ? "Source" : "Destination");

There are three cases to invoking:
1) src_numa_node >= nr_sockets
2) dst_numa_node >= nr_sockets
3) both src_numa_node and dst_numa_node >= nr_sockets

It could cover cases 1&2 in your commit, but could not cover case 3.

So I think we should keep original implement.

Thanks

>  		return -1;
>  	}
>  
> 


More information about the dev mailing list