[dpdk-dev] [PATCH v2 6/6] test/ring: use relaxed barriers for ring stress test
Honnappa Nagarahalli
Honnappa.Nagarahalli at arm.com
Fri Oct 8 01:40:03 CEST 2021
<snip>
>
>
> > wrk_cmd variable is used to signal the worker thread to start or stop
> > the stress test loop. Relaxed barriers are used to achieve the same.
> >
> > Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> > Reviewed-by: Ola Liljedahl <ola.liljedahl at arm.com>
> > Reviewed-by: Feifei Wang <feifei.wang at arm.com>
> > ---
> > app/test/test_ring_stress_impl.h | 18 +++++++++---------
> > 1 file changed, 9 insertions(+), 9 deletions(-)
> >
> > diff --git a/app/test/test_ring_stress_impl.h
> > b/app/test/test_ring_stress_impl.h
> > index f9ca63b908..ee8293bb04 100644
> > --- a/app/test/test_ring_stress_impl.h
> > +++ b/app/test/test_ring_stress_impl.h
> > @@ -22,7 +22,7 @@ enum {
> > WRK_CMD_RUN,
> > };
> >
> > -static volatile uint32_t wrk_cmd __rte_cache_aligned;
> > +static volatile uint32_t wrk_cmd __rte_cache_aligned = WRK_CMD_STOP;
>
> If we switch to using atomic load/store for 'wrk_cmd', then we can get remove
> 'volatile' classifier in the 'wrk_cmd' definition above?
Agree, will remove
>
> >
> > /* test run-time in seconds */
> > static const uint32_t run_time = 60;
<snip>
More information about the dev
mailing list