> -----Original Message-----
> From: Dharmik Thakkar <[email protected]>
> Sent: Monday, November 2, 2020 11:12 PM
> To: Bruce Richardson <[email protected]>; Vladimir Medvedkin
> <[email protected]>; Gavin Hu <[email protected]>;
> Honnappa Nagarahalli <[email protected]>; Ruifeng Wang
> <[email protected]>
> Cc: [email protected]; nd <[email protected]>; Dharmik Thakkar
> <[email protected]>; [email protected]
> Subject: [PATCH v3 3/4] test/lpm: remove error checking in rcu qsbr perf
> 
> Remove redundant error checking for reader threads since they never return
> error.
> 
> Fixes: eff30b59cc2e ("test/lpm: add RCU performance tests")
> Cc: [email protected]
> Cc: [email protected]
> 
> Signed-off-by: Dharmik Thakkar <[email protected]>
> Reviewed-by: Ruifeng Wang <[email protected]>
Looks good
Reviewed-by: Honnappa Nagarahalli <[email protected]>

> ---
>  app/test/test_lpm_perf.c | 21 ++++++++-------------
>  1 file changed, 8 insertions(+), 13 deletions(-)
> 
> diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c index
> fc4c9b60cbbc..fa6ebc4f7547 100644
> --- a/app/test/test_lpm_perf.c
> +++ b/app/test/test_lpm_perf.c
> @@ -556,11 +556,10 @@ test_lpm_rcu_perf_multi_writer(void)
>               __atomic_load_n(&gwrite_cycles, __ATOMIC_RELAXED)
>               / TOTAL_WRITES);
> 
> -     /* Wait and check return value from reader threads */
>       writer_done = 1;
> +     /* Wait until all readers have exited */
>       for (i = 2; i < num_cores; i++)
> -             if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
> -                     goto error;
> +             rte_eal_wait_lcore(enabled_core_ids[i]);
> 
>       rte_lpm_free(lpm);
>       rte_free(rv);
> @@ -605,10 +604,9 @@ test_lpm_rcu_perf_multi_writer(void)
>               / TOTAL_WRITES);
> 
>       writer_done = 1;
> -     /* Wait and check return value from reader threads */
> +     /* Wait until all readers have exited */
>       for (i = 2; i < num_cores; i++)
> -             if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
> -                     goto error;
> +             rte_eal_wait_lcore(enabled_core_ids[i]);
> 
>       rte_lpm_free(lpm);
> 
> @@ -712,10 +710,9 @@ test_lpm_rcu_perf(void)
>               (double)total_cycles / TOTAL_WRITES);
> 
>       writer_done = 1;
> -     /* Wait and check return value from reader threads */
> +     /* Wait until all readers have exited */
>       for (i = 0; i < num_cores; i++)
> -             if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
> -                     goto error;
> +             rte_eal_wait_lcore(enabled_core_ids[i]);
> 
>       rte_lpm_free(lpm);
>       rte_free(rv);
> @@ -771,11 +768,9 @@ test_lpm_rcu_perf(void)
>               (double)total_cycles / TOTAL_WRITES);
> 
>       writer_done = 1;
> -     /* Wait and check return value from reader threads */
> +     /* Wait until all readers have exited */
>       for (i = 0; i < num_cores; i++)
> -             if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
> -                     printf("Warning: lcore %u not finished.\n",
> -                             enabled_core_ids[i]);
> +             rte_eal_wait_lcore(enabled_core_ids[i]);
> 
>       rte_lpm_free(lpm);
> 
> --
> 2.17.1

Reply via email to