Thread (27 messages) flat view 27 messages, 5 authors, 2021-10-25

Re: [dpdk-dev] [PATCH v2 6/6] test/ring: use relaxed barriers for ring stress test

From: Honnappa Nagarahalli <hidden>
Date: 2021-10-07 23:40:17

<snip>
quoted
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 <redacted>
Reviewed-by: Ola Liljedahl <redacted>
Reviewed-by: Feifei Wang <redacted>
---
 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
quoted
 /* test run-time in seconds */
 static const uint32_t run_time = 60;
<snip>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help