<snip>
> 
> Return error if Add/Delete fail in multiwriter perf test
> 
> Fixes: eff30b59cc2e ("test/lpm: add RCU performance tests")
> Cc: honnappa.nagaraha...@arm.com
> Cc: sta...@dpdk.org
> 
> Signed-off-by: Dharmik Thakkar <dharmik.thak...@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.w...@arm.com>
Looks good
Reviewed-by: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com>

> ---
>  app/test/test_lpm_perf.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c index
> 45164b23214b..fc4c9b60cbbc 100644
> --- a/app/test/test_lpm_perf.c
> +++ b/app/test/test_lpm_perf.c
> @@ -453,6 +453,7 @@ test_lpm_rcu_qsbr_writer(void *arg)
>                                       next_hop_add) != 0) {
>                               printf("Failed to add iteration %d, route#
> %d\n",
>                                       i, j);
> +                             goto error;
>                       }
>                       pthread_mutex_unlock(&lpm_mutex);
>               }
> @@ -464,6 +465,7 @@ test_lpm_rcu_qsbr_writer(void *arg)
>                               large_ldepth_route_table[j].depth) != 0) {
>                               printf("Failed to delete iteration %d, route#
> %d\n",
>                                       i, j);
> +                             goto error;
>                       }
>                       pthread_mutex_unlock(&lpm_mutex);
>               }
> @@ -474,6 +476,10 @@ test_lpm_rcu_qsbr_writer(void *arg)
>       __atomic_fetch_add(&gwrite_cycles, total_cycles,
> __ATOMIC_RELAXED);
> 
>       return 0;
> +
> +error:
> +     pthread_mutex_unlock(&lpm_mutex);
> +     return -1;
>  }
> 
>  /*
> --
> 2.17.1

Reply via email to