Message ID | 1715704559-15839-14-git-send-email-roretzla@linux.microsoft.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | David Marchand |
Headers |
Return-Path: <dev-bounces@dpdk.org> 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 2F70344024; Tue, 14 May 2024 18:37:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E7F5540E4A; Tue, 14 May 2024 18:36:21 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 85FC7402D1 for <dev@dpdk.org>; Tue, 14 May 2024 18:36:03 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 0340E20B2C8F; Tue, 14 May 2024 09:36:00 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0340E20B2C8F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1715704561; bh=toeNJ75iRO2tH0ywNAWGIP1eDLD/U3juCLt4ExsM3OE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZT1cZ4gZkJr5UoEEoJqA8GT0ZNAYVIZCnqjtwf08D9Lrmp9MJWVDfa+Bp6m/s0Za7 mLtv2XT4iH7pHNWuKhbGbwUmKXIRtzcFCQUQbcTLNyJpnaCsDtoTTGCD4n14qpd1Lt mpBm65Nwt8kmUiG8dkTOab1bTJnIPlMn6PEkb5s0= From: Tyler Retzlaff <roretzla@linux.microsoft.com> To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>, =?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>, Abdullah Sevincer <abdullah.sevincer@intel.com>, Ajit Khaparde <ajit.khaparde@broadcom.com>, Alok Prasad <palok@marvell.com>, Anatoly Burakov <anatoly.burakov@intel.com>, Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>, Anoob Joseph <anoobj@marvell.com>, Bruce Richardson <bruce.richardson@intel.com>, Byron Marohn <byron.marohn@intel.com>, Chenbo Xia <chenbox@nvidia.com>, Chengwen Feng <fengchengwen@huawei.com>, Ciara Loftus <ciara.loftus@intel.com>, Ciara Power <ciara.power@intel.com>, Dariusz Sosnowski <dsosnowski@nvidia.com>, David Hunt <david.hunt@intel.com>, Devendra Singh Rawat <dsinghrawat@marvell.com>, Erik Gabriel Carrillo <erik.g.carrillo@intel.com>, Guoyang Zhou <zhouguoyang@huawei.com>, Harman Kalra <hkalra@marvell.com>, Harry van Haaren <harry.van.haaren@intel.com>, Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>, Jakub Grajciar <jgrajcia@cisco.com>, Jerin Jacob <jerinj@marvell.com>, Jeroen de Borst <jeroendb@google.com>, Jian Wang <jianwang@trustnetic.com>, Jiawen Wu <jiawenwu@trustnetic.com>, Jie Hai <haijie1@huawei.com>, Jingjing Wu <jingjing.wu@intel.com>, Joshua Washington <joshwash@google.com>, Joyce Kong <joyce.kong@arm.com>, Junfeng Guo <junfeng.guo@intel.com>, Kevin Laatz <kevin.laatz@intel.com>, Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>, Liang Ma <liangma@liangbit.com>, Long Li <longli@microsoft.com>, Maciej Czekaj <mczekaj@marvell.com>, Matan Azrad <matan@nvidia.com>, Maxime Coquelin <maxime.coquelin@redhat.com>, Nicolas Chautru <nicolas.chautru@intel.com>, Ori Kam <orika@nvidia.com>, Pavan Nikhilesh <pbhagavatula@marvell.com>, Peter Mccarthy <peter.mccarthy@intel.com>, Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>, Reshma Pattan <reshma.pattan@intel.com>, Rosen Xu <rosen.xu@intel.com>, Ruifeng Wang <ruifeng.wang@arm.com>, Rushil Gupta <rushilg@google.com>, Sameh Gobriel <sameh.gobriel@intel.com>, Sivaprasad Tummala <sivaprasad.tummala@amd.com>, Somnath Kotur <somnath.kotur@broadcom.com>, Stephen Hemminger <stephen@networkplumber.org>, Suanming Mou <suanmingm@nvidia.com>, Sunil Kumar Kori <skori@marvell.com>, Sunil Uttarwar <sunilprakashrao.uttarwar@amd.com>, Tetsuya Mukawa <mtetsuyah@gmail.com>, Vamsi Attunuru <vattunuru@marvell.com>, Viacheslav Ovsiienko <viacheslavo@nvidia.com>, Vladimir Medvedkin <vladimir.medvedkin@intel.com>, Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>, Yipeng Wang <yipeng1.wang@intel.com>, Yisen Zhuang <yisen.zhuang@huawei.com>, Ziyang Xuan <xuanziyang2@huawei.com>, Tyler Retzlaff <roretzla@linux.microsoft.com> Subject: [PATCH v6 13/45] net/gve: use rte stdatomic API Date: Tue, 14 May 2024 09:35:27 -0700 Message-Id: <1715704559-15839-14-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1715704559-15839-1-git-send-email-roretzla@linux.microsoft.com> References: <1710967892-7046-1-git-send-email-roretzla@linux.microsoft.com> <1715704559-15839-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 <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
use stdatomic API
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | warning | coding style issues |
Commit Message
Tyler Retzlaff
May 14, 2024, 4:35 p.m. UTC
Replace the use of gcc builtin __atomic_xxx intrinsics with corresponding rte_atomic_xxx optional rte stdatomic API. Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/gve/base/gve_osdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/gve/base/gve_osdep.h b/drivers/net/gve/base/gve_osdep.h index a3702f4..c0ee0d5 100644 --- a/drivers/net/gve/base/gve_osdep.h +++ b/drivers/net/gve/base/gve_osdep.h @@ -135,7 +135,7 @@ struct gve_dma_mem { static inline void * gve_alloc_dma_mem(struct gve_dma_mem *mem, u64 size) { - static uint16_t gve_dma_memzone_id; + static RTE_ATOMIC(uint16_t) gve_dma_memzone_id; const struct rte_memzone *mz = NULL; char z_name[RTE_MEMZONE_NAMESIZE]; @@ -143,7 +143,7 @@ struct gve_dma_mem { return NULL; snprintf(z_name, sizeof(z_name), "gve_dma_%u", - __atomic_fetch_add(&gve_dma_memzone_id, 1, __ATOMIC_RELAXED)); + rte_atomic_fetch_add_explicit(&gve_dma_memzone_id, 1, rte_memory_order_relaxed)); mz = rte_memzone_reserve_aligned(z_name, size, SOCKET_ID_ANY, RTE_MEMZONE_IOVA_CONTIG, PAGE_SIZE);