[v3] app/dma-perf: calrify incorrect NUMA config
Checks
Commit Message
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`
3) uses `printf` instead of PRINT_ERR
current patch changes the above to
1) identify if source or|and destination is incorrect
2) fix wording to incorrect
3) use PRINT_ERR macro
Signed-off-by: Vipin Varghese <vipin.varghese@amd.com>
---
V3 changes:
- use snake-case instead of camel case for static scope functions.
- convert console words to lower case.
V2 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(-)
Comments
20/03/2024 02:40, Vipin Varghese:
> 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`
> 3) uses `printf` instead of PRINT_ERR
>
> current patch changes the above to
> 1) identify if source or|and destination is incorrect
> 2) fix wording to incorrect
> 3) use PRINT_ERR macro
This is waiting for review.
> Subject: [EXTERNAL] [PATCH v3] app/dma-perf: calrify incorrect NUMA config
Looks good to me, with minor correction in subject: calrify -> clarify.
Thanks,
Gowrishankar
20/03/2024 02:40, Vipin Varghese:
> 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`
> 3) uses `printf` instead of PRINT_ERR
>
> current patch changes the above to
> 1) identify if source or|and destination is incorrect
> 2) fix wording to incorrect
> 3) use PRINT_ERR macro
>
> Signed-off-by: Vipin Varghese <vipin.varghese@amd.com>
Applied, thanks.
>
> 20/03/2024 02:40, Vipin Varghese:
> > 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`
> > 3) uses `printf` instead of PRINT_ERR
> >
> > current patch changes the above to
> > 1) identify if source or|and destination is incorrect
> > 2) fix wording to incorrect
> > 3) use PRINT_ERR macro
> >
> > Signed-off-by: Vipin Varghese <vipin.varghese@amd.com>
>
> Applied, thanks.
Thanks
>
>
@@ -442,11 +442,16 @@ setup_memory_env(struct test_configure *cfg,
unsigned int nr_sockets;
uint32_t nr_buf = cfg->nr_buf;
uint32_t i;
+ bool is_src_numa_incorrect, is_dst_numa_incorrect;
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");
+ is_src_numa_incorrect = (cfg->src_numa_node >= nr_sockets);
+ is_dst_numa_incorrect = (cfg->dst_numa_node >= nr_sockets);
+
+ if (is_src_numa_incorrect || is_dst_numa_incorrect) {
+ PRINT_ERR("Error: Incorrect NUMA config for %s.\n",
+ (is_src_numa_incorrect && is_dst_numa_incorrect) ? "source & destination" :
+ (is_src_numa_incorrect) ? "source" : "destination");
return -1;
}