From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
David Hunt <david.hunt@intel.com>,
Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
Jerin Jacob <jerinj@marvell.com>,
Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
Sameh Gobriel <sameh.gobriel@intel.com>,
Sunil Kumar Kori <skori@marvell.com>,
Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
Yipeng Wang <yipeng1.wang@intel.com>,
mb@smartsharesystems.com, thomas@monjalon.net,
Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: [PATCH v2 2/6] eal: use rte atomic thread fence
Date: Wed, 14 Feb 2024 22:50:55 -0800 [thread overview]
Message-ID: <1707979859-3984-3-git-send-email-roretzla@linux.microsoft.com> (raw)
In-Reply-To: <1707979859-3984-1-git-send-email-roretzla@linux.microsoft.com>
Use rte_atomic_thread_fence instead of directly using
__atomic_thread_fence builtin gcc intrinsic
Update rte_mcslock.h to use rte_atomic_thread_fence instead of
directly using internal __rte_atomic_thread_fence
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
lib/eal/common/eal_common_trace.c | 2 +-
lib/eal/include/rte_mcslock.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c
index 6ad87fc..918f49b 100644
--- a/lib/eal/common/eal_common_trace.c
+++ b/lib/eal/common/eal_common_trace.c
@@ -526,7 +526,7 @@ rte_trace_mode rte_trace_mode_get(void)
/* Add the trace point at tail */
STAILQ_INSERT_TAIL(&tp_list, tp, next);
- __atomic_thread_fence(rte_memory_order_release);
+ rte_atomic_thread_fence(rte_memory_order_release);
/* All Good !!! */
return 0;
diff --git a/lib/eal/include/rte_mcslock.h b/lib/eal/include/rte_mcslock.h
index 2ca967f..0aeb1a0 100644
--- a/lib/eal/include/rte_mcslock.h
+++ b/lib/eal/include/rte_mcslock.h
@@ -83,7 +83,7 @@
* store to prev->next. Otherwise it will cause a deadlock. Need a
* store-load barrier.
*/
- __rte_atomic_thread_fence(rte_memory_order_acq_rel);
+ rte_atomic_thread_fence(rte_memory_order_acq_rel);
/* If the lock has already been acquired, it first atomically
* places the node at the end of the queue and then proceeds
* to spin on me->locked until the previous lock holder resets
@@ -117,7 +117,7 @@
* while-loop first. This has the potential to cause a
* deadlock. Need a load barrier.
*/
- __rte_atomic_thread_fence(rte_memory_order_acquire);
+ rte_atomic_thread_fence(rte_memory_order_acquire);
/* More nodes added to the queue by other CPUs.
* Wait until the next pointer is set.
*/
--
1.8.3.1
next prev parent reply other threads:[~2024-02-15 6:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 3:04 [PATCH 0/5] use rte atomic thread fence Tyler Retzlaff
2023-11-02 3:04 ` [PATCH 1/5] distributor: " Tyler Retzlaff
2023-11-02 3:04 ` [PATCH 2/5] eal: " Tyler Retzlaff
2023-11-02 3:04 ` [PATCH 3/5] hash: " Tyler Retzlaff
2023-11-02 3:04 ` [PATCH 4/5] ring: " Tyler Retzlaff
2023-11-02 3:04 ` [PATCH 5/5] stack: " Tyler Retzlaff
2023-11-02 7:42 ` [PATCH 0/5] " Morten Brørup
2023-11-08 17:04 ` Thomas Monjalon
2023-11-08 18:49 ` Tyler Retzlaff
2024-02-14 22:40 ` Thomas Monjalon
2024-02-15 6:50 ` [PATCH v2 0/6] " Tyler Retzlaff
2024-02-15 6:50 ` [PATCH v2 1/6] distributor: " Tyler Retzlaff
2024-02-15 6:50 ` Tyler Retzlaff [this message]
2024-02-15 6:50 ` [PATCH v2 3/6] hash: " Tyler Retzlaff
2024-02-15 6:50 ` [PATCH v2 4/6] ring: " Tyler Retzlaff
2024-02-15 6:50 ` [PATCH v2 5/6] stack: " Tyler Retzlaff
2024-02-15 6:50 ` [PATCH v2 6/6] lpm: " Tyler Retzlaff
2024-02-18 3:23 ` [PATCH v2 0/6] " fengchengwen
2024-02-18 12:18 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1707979859-3984-3-git-send-email-roretzla@linux.microsoft.com \
--to=roretzla@linux.microsoft.com \
--cc=bruce.richardson@intel.com \
--cc=david.hunt@intel.com \
--cc=dev@dpdk.org \
--cc=honnappa.nagarahalli@arm.com \
--cc=jerinj@marvell.com \
--cc=konstantin.v.ananyev@yandex.ru \
--cc=mb@smartsharesystems.com \
--cc=sameh.gobriel@intel.com \
--cc=skori@marvell.com \
--cc=thomas@monjalon.net \
--cc=vladimir.medvedkin@intel.com \
--cc=yipeng1.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.