From patchwork Tue Oct 17 20:31:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 132809 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 12E3943190; Tue, 17 Oct 2023 22:32:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F22142E23; Tue, 17 Oct 2023 22:31:32 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 1E477402EC for ; Tue, 17 Oct 2023 22:31:20 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id DD04C20B74C8; Tue, 17 Oct 2023 13:31:18 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DD04C20B74C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1697574678; bh=3RvYqLmXe/Sbt8XnSqbhtBgPw0aJh/3Vrf3qV3Y9S60=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AldVRogMqEHJq6iBYZFKgfqBY/5P0WSLtW/xJoys912Vg0BD06xAHDGh9NVuBASvd x5XVpOF8g3mmodGPdRG+ek+pqdb6mqObV21KwT37SiTFEDB6GqKK2rNStBKRpt+Iqw lWxS3MjBNTbzC9RrLMLu5XKkZmqp0nhFq2hF5A1U= From: Tyler Retzlaff To: dev@dpdk.org Cc: Akhil Goyal , Anatoly Burakov , Andrew Rybchenko , Bruce Richardson , Chenbo Xia , Ciara Power , David Christensen , David Hunt , Dmitry Kozlyuk , Dmitry Malloy , Elena Agostini , Erik Gabriel Carrillo , Fan Zhang , Ferruh Yigit , Harman Kalra , Harry van Haaren , Honnappa Nagarahalli , Jerin Jacob , Konstantin Ananyev , Matan Azrad , Maxime Coquelin , Narcisa Ana Maria Vasile , Nicolas Chautru , Olivier Matz , Ori Kam , Pallavi Kadam , Pavan Nikhilesh , Reshma Pattan , Sameh Gobriel , Shijith Thotton , Sivaprasad Tummala , Stephen Hemminger , Suanming Mou , Sunil Kumar Kori , Thomas Monjalon , Viacheslav Ovsiienko , Vladimir Medvedkin , Yipeng Wang , Tyler Retzlaff Subject: [PATCH v2 08/19] mempool: use rte optional stdatomic API Date: Tue, 17 Oct 2023 13:31:06 -0700 Message-Id: <1697574677-16578-9-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1697574677-16578-1-git-send-email-roretzla@linux.microsoft.com> References: <1697497745-20664-1-git-send-email-roretzla@linux.microsoft.com> <1697574677-16578-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 Replace the use of gcc builtin __atomic_xxx intrinsics with corresponding rte_atomic_xxx optional stdatomic API Signed-off-by: Tyler Retzlaff Acked-by: Konstantin Ananyev --- lib/mempool/rte_mempool.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h index f70bf36..df87cd2 100644 --- a/lib/mempool/rte_mempool.h +++ b/lib/mempool/rte_mempool.h @@ -327,8 +327,8 @@ struct rte_mempool { if (likely(__lcore_id < RTE_MAX_LCORE)) \ (mp)->stats[__lcore_id].name += (n); \ else \ - __atomic_fetch_add(&((mp)->stats[RTE_MAX_LCORE].name), \ - (n), __ATOMIC_RELAXED); \ + rte_atomic_fetch_add_explicit(&((mp)->stats[RTE_MAX_LCORE].name), \ + (n), rte_memory_order_relaxed); \ } while (0) #else #define RTE_MEMPOOL_STAT_ADD(mp, name, n) do {} while (0)