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 5EEB043268; Thu, 2 Nov 2023 04:04:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E4035402DF; Thu, 2 Nov 2023 04:04:36 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id DC9B4402CF for ; Thu, 2 Nov 2023 04:04:31 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 16C5820B74C4; Wed, 1 Nov 2023 20:04:30 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 16C5820B74C4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1698894271; bh=nXEJjRzDL4O01yO2JnhWFoRRiYXhzD8TQOzcce4OVIA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ptWlFX6OBGTu0PtpQgWtCy7TMaznL/ERbXJnytj+iuhPICmnu4uRZB5ooUYc4cGaL wu7sqa/aYS0oXULKjccOL9JPRjcG/UiMLXSO7DnmYnp2FCLlFoqFyOyCoFmmyxhr13 DQRR5lpvCbqpeZsTrygOM/jtVI8hxvWwxklpOT9A= 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 4/5] ring: use rte atomic thread fence Date: Wed, 1 Nov 2023 20:04:24 -0700 Message-Id: <1698894265-22963-5-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/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..38a003d 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