DPDK patches and discussions
 help / color / mirror / Atom feed
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 3/6] hash: use rte atomic thread fence
Date: Wed, 14 Feb 2024 22:50:56 -0800	[thread overview]
Message-ID: <1707979859-3984-4-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

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 lib/hash/rte_cuckoo_hash.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c
index 7045675..9cf9464 100644
--- a/lib/hash/rte_cuckoo_hash.c
+++ b/lib/hash/rte_cuckoo_hash.c
@@ -878,7 +878,7 @@ struct rte_hash *
 			/* The store to sig_current should not
 			 * move above the store to tbl_chng_cnt.
 			 */
-			__atomic_thread_fence(rte_memory_order_release);
+			rte_atomic_thread_fence(rte_memory_order_release);
 		}
 
 		/* Need to swap current/alt sig to allow later
@@ -910,7 +910,7 @@ struct rte_hash *
 		/* The store to sig_current should not
 		 * move above the store to tbl_chng_cnt.
 		 */
-		__atomic_thread_fence(rte_memory_order_release);
+		rte_atomic_thread_fence(rte_memory_order_release);
 	}
 
 	curr_bkt->sig_current[curr_slot] = sig;
@@ -1403,7 +1403,7 @@ struct rte_hash *
 		/* The loads of sig_current in search_one_bucket
 		 * should not move below the load from tbl_chng_cnt.
 		 */
-		__atomic_thread_fence(rte_memory_order_acquire);
+		rte_atomic_thread_fence(rte_memory_order_acquire);
 		/* Re-read the table change counter to check if the
 		 * table has changed during search. If yes, re-do
 		 * the search.
@@ -1632,7 +1632,7 @@ struct rte_hash *
 				/* The store to sig_current should
 				 * not move above the store to tbl_chng_cnt.
 				 */
-				__atomic_thread_fence(rte_memory_order_release);
+				rte_atomic_thread_fence(rte_memory_order_release);
 			}
 			last_bkt->sig_current[i] = NULL_SIGNATURE;
 			rte_atomic_store_explicit(&last_bkt->key_idx[i],
@@ -2223,7 +2223,7 @@ struct rte_hash *
 		/* The loads of sig_current in compare_signatures
 		 * should not move below the load from tbl_chng_cnt.
 		 */
-		__atomic_thread_fence(rte_memory_order_acquire);
+		rte_atomic_thread_fence(rte_memory_order_acquire);
 		/* Re-read the table change counter to check if the
 		 * table has changed during search. If yes, re-do
 		 * the search.
-- 
1.8.3.1


  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] " 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   ` [PATCH v2 2/6] eal: " Tyler Retzlaff
2024-02-15  6:50   ` Tyler Retzlaff [this message]
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-4-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 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).