DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] eal: add notes to SMP memory barrier APIs
@ 2023-06-21  6:44 Ruifeng Wang
  2023-06-21  7:29 ` Thomas Monjalon
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Ruifeng Wang @ 2023-06-21  6:44 UTC (permalink / raw)
  To: thomas, david.marchand
  Cc: dev, konstantin.v.ananyev, honnappa.nagarahalli, nd, Ruifeng Wang

The rte_smp_xx() APIs are deprecated. But it is not mentioned
in the function header.
Added notes in function header for clarification.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 lib/eal/include/generic/rte_atomic.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/eal/include/generic/rte_atomic.h b/lib/eal/include/generic/rte_atomic.h
index 58df843c54..542a2c16ff 100644
--- a/lib/eal/include/generic/rte_atomic.h
+++ b/lib/eal/include/generic/rte_atomic.h
@@ -55,6 +55,11 @@ static inline void rte_rmb(void);
  * Guarantees that the LOAD and STORE operations that precede the
  * rte_smp_mb() call are globally visible across the lcores
  * before the LOAD and STORE operations that follows it.
+ *
+ * @note
+ *  This function is deprecated. It adds complexity to the memory model
+ *  used by this project. C11 memory model should always be used.
+ *  rte_atomic_thread_fence() should be used instead.
  */
 static inline void rte_smp_mb(void);
 
@@ -64,6 +69,11 @@ static inline void rte_smp_mb(void);
  * Guarantees that the STORE operations that precede the
  * rte_smp_wmb() call are globally visible across the lcores
  * before the STORE operations that follows it.
+ *
+ * @note
+ *  This function is deprecated. It adds complexity to the memory model
+ *  used by this project. C11 memory model should always be used.
+ *  rte_atomic_thread_fence() should be used instead.
  */
 static inline void rte_smp_wmb(void);
 
@@ -73,6 +83,11 @@ static inline void rte_smp_wmb(void);
  * Guarantees that the LOAD operations that precede the
  * rte_smp_rmb() call are globally visible across the lcores
  * before the LOAD operations that follows it.
+ *
+ * @note
+ *  This function is deprecated. It adds complexity to the memory model
+ *  used by this project. C11 memory model should always be used.
+ *  rte_atomic_thread_fence() should be used instead.
  */
 static inline void rte_smp_rmb(void);
 ///@}
-- 
2.25.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-07-28  9:17 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-21  6:44 [PATCH] eal: add notes to SMP memory barrier APIs Ruifeng Wang
2023-06-21  7:29 ` Thomas Monjalon
2023-06-25  7:55   ` Ruifeng Wang
2023-06-22 18:19 ` Mattias Rönnblom
2023-06-23 21:51   ` Tyler Retzlaff
2023-06-25  8:45     ` Ruifeng Wang
2023-06-25 15:40       ` Thomas Monjalon
2023-06-25  8:17   ` Ruifeng Wang
2023-06-29 19:28     ` Mattias Rönnblom
2023-07-03  6:12       ` Ruifeng Wang
2023-06-26  7:12 ` [PATCH v2] " Ruifeng Wang
2023-06-29 19:43   ` Mattias Rönnblom
2023-07-03  7:02     ` Ruifeng Wang
2023-07-04 12:08       ` Mattias Rönnblom
2023-07-03  9:56 ` [PATCH v3] " Ruifeng Wang
2023-07-28  9:17   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).