From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7FB6543268; Thu, 2 Nov 2023 04:04:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A0ED402C4; Thu, 2 Nov 2023 04:04:33 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id BF1F840284 for ; Thu, 2 Nov 2023 04:04:31 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 09DA320B74C3; Wed, 1 Nov 2023 20:04:30 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 09DA320B74C3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1698894271; bh=lavQ2zNV2kAJsaK2MwR09naFlG2mmCAk2MzoljoaY0I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AmBGpWjlVoHyA3t8lcmPdNxv2e++c3Udq/TPJGP/KTzKOVPNovuvFUNpIdcOPM8x4 8EbEDsM49HZSFIG9v/wOv33uID2ipMHFPTmAoCVL5JBGiXlLWiWNITNADCTOY9N+m1 ZhnkGHDYNsOFXRyn0+TWIp3hDRoXphLartOXReeg= From: Tyler Retzlaff To: dev@dpdk.org Cc: Bruce Richardson , David Hunt , Honnappa Nagarahalli , Jerin Jacob , Konstantin Ananyev , Sameh Gobriel , Sunil Kumar Kori , Vladimir Medvedkin , Yipeng Wang , Tyler Retzlaff Subject: [PATCH 3/5] hash: use rte atomic thread fence Date: Wed, 1 Nov 2023 20:04:23 -0700 Message-Id: <1698894265-22963-4-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1698894265-22963-1-git-send-email-roretzla@linux.microsoft.com> References: <1698894265-22963-1-git-send-email-roretzla@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Use __rte_atomic_thread_fence instead of directly using __atomic_thread_fence builtin gcc intrinsic Signed-off-by: Tyler Retzlaff --- 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 b2cf60d..ca350ed 100644 --- a/lib/hash/rte_cuckoo_hash.c +++ b/lib/hash/rte_cuckoo_hash.c @@ -871,7 +871,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 @@ -903,7 +903,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; @@ -1396,7 +1396,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. @@ -1625,7 +1625,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], @@ -2216,7 +2216,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