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 57A2E43B06; Thu, 15 Feb 2024 07:51:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 07211433CA; Thu, 15 Feb 2024 07:51:13 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 154CB4339A for ; Thu, 15 Feb 2024 07:51:07 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 6A30C207F22E; Wed, 14 Feb 2024 22:51:06 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6A30C207F22E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707979866; bh=n8/WNDXKZ1jhnxBUlTFzLLvYLufhWLZ4TIZj22ICJxA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gF+EXJAXPdJjQ3CqTMlqtjwxPlSmcTuf0behiMVqiJzmBRHZkJKW/HUlpUlBn3DDo ZDEJo9BP9BOCXmu4laSR8JcupOUqEN0PNrtSeb8MnOz9GWXTPS3rBkhGNBX9izRMCO QZA1ReU/pan5fow3Svela2YyO3CCY0DR5X3chpRw= 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 , mb@smartsharesystems.com, thomas@monjalon.net, Tyler Retzlaff Subject: [PATCH v2 4/6] ring: use rte atomic thread fence Date: Wed, 14 Feb 2024 22:50:57 -0800 Message-Id: <1707979859-3984-5-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1707979859-3984-1-git-send-email-roretzla@linux.microsoft.com> References: <1698894265-22963-1-git-send-email-roretzla@linux.microsoft.com> <1707979859-3984-1-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Morten Brørup --- lib/ring/rte_ring_c11_pvt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ring/rte_ring_c11_pvt.h b/lib/ring/rte_ring_c11_pvt.h index 5c10ad8..629b2d9 100644 --- a/lib/ring/rte_ring_c11_pvt.h +++ b/lib/ring/rte_ring_c11_pvt.h @@ -68,7 +68,7 @@ n = max; /* Ensure the head is read before tail */ - __atomic_thread_fence(rte_memory_order_acquire); + rte_atomic_thread_fence(rte_memory_order_acquire); /* load-acquire synchronize with store-release of ht->tail * in update_tail. @@ -145,7 +145,7 @@ n = max; /* Ensure the head is read before tail */ - __atomic_thread_fence(rte_memory_order_acquire); + rte_atomic_thread_fence(rte_memory_order_acquire); /* this load-acquire synchronize with store-release of ht->tail * in update_tail. -- 1.8.3.1