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 4F7B143D0F; Thu, 21 Mar 2024 19:11:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DDDC42D90; Thu, 21 Mar 2024 19:11:22 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id C286042D45 for ; Thu, 21 Mar 2024 19:11:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1711044680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RVue0RghQi2mkKie9EuyBePyEWCpv7xU3GROlr/27bE=; b=C9VKiPIdgHr1tmR7m+NGKwLbrrDM++gxIVERKKasrjvMy8ix2FYlIk6vsSy77hu2wlfVkf wp4itXKk5LcRqeVf2wgK7rf9iFsxs/8EaXatF+HYytiDff0FRpwXFP7fdaAiR/VTY7jh3O Pgv5IdMjE5M5RkDdq7DZvw9BEhloF78= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-443-2BZuKD1uOMGtS5ZRpGGGNw-1; Thu, 21 Mar 2024 14:11:14 -0400 X-MC-Unique: 2BZuKD1uOMGtS5ZRpGGGNw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 660C73C0C88E; Thu, 21 Mar 2024 18:11:11 +0000 (UTC) Received: from RHTPC1VM0NT (unknown [10.22.10.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7B82A492BD0; Thu, 21 Mar 2024 18:11:04 +0000 (UTC) From: Aaron Conole To: Tyler Retzlaff Cc: dev@dpdk.org, Mattias =?utf-8?Q?R=C3=B6nnblom?= , Morten =?utf-8?Q?Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Alok Prasad , Anatoly Burakov , Andrew Rybchenko , Anoob Joseph , Bruce Richardson , Byron Marohn , Chenbo Xia , Chengwen Feng , Ciara Loftus , Ciara Power , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Erik Gabriel Carrillo , Guoyang Zhou , Harman Kalra , Harry van Haaren , Honnappa Nagarahalli , Jakub Grajciar , Jerin Jacob , Jeroen de Borst , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , Joshua Washington , Joyce Kong , Junfeng Guo , Kevin Laatz , Konstantin Ananyev , Liang Ma , Long Li , Maciej Czekaj , Matan Azrad , Maxime Coquelin , Nicolas Chautru , Ori Kam , Pavan Nikhilesh , Peter Mccarthy , Rahul Lakkireddy , Reshma Pattan , Rosen Xu , Ruifeng Wang , Rushil Gupta , Sameh Gobriel , Sivaprasad Tummala , Somnath Kotur , Stephen Hemminger , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Tetsuya Mukawa , Vamsi Attunuru , Viacheslav Ovsiienko , Vladimir Medvedkin , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Ziyang Xuan Subject: Re: [PATCH 15/46] net/sfc: use rte stdatomic API References: <1710967892-7046-1-git-send-email-roretzla@linux.microsoft.com> <1710967892-7046-16-git-send-email-roretzla@linux.microsoft.com> Date: Thu, 21 Mar 2024 14:11:00 -0400 In-Reply-To: <1710967892-7046-16-git-send-email-roretzla@linux.microsoft.com> (Tyler Retzlaff's message of "Wed, 20 Mar 2024 13:51:01 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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 Tyler Retzlaff writes: > Replace the use of gcc builtin __atomic_xxx intrinsics with > corresponding rte_atomic_xxx optional rte stdatomic API. > > Signed-off-by: Tyler Retzlaff > --- > drivers/net/sfc/meson.build | 5 ++--- > drivers/net/sfc/sfc_mae_counter.c | 30 +++++++++++++++--------------- > drivers/net/sfc/sfc_repr_proxy.c | 8 ++++---- > drivers/net/sfc/sfc_stats.h | 8 ++++---- > 4 files changed, 25 insertions(+), 26 deletions(-) > > diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build > index 5adde68..d3603a0 100644 > --- a/drivers/net/sfc/meson.build > +++ b/drivers/net/sfc/meson.build > @@ -47,9 +47,8 @@ int main(void) > __int128 a = 0; > __int128 b; > > - b = __atomic_load_n(&a, __ATOMIC_RELAXED); > - __atomic_store(&b, &a, __ATOMIC_RELAXED); > - __atomic_store_n(&b, a, __ATOMIC_RELAXED); > + b = rte_atomic_load_explicit(&a, rte_memory_order_relaxed); > + rte_atomic_store_explicit(&b, a, rte_memory_order_relaxed); > return 0; > } > ''' I think this is a case where simple find/replace is a problem. For example, this is a sample file that the meson build uses to determine if libatomic is properly installed. However, it is very bare-bones. Your change is likely causing a compile error when cc.links happens in the meson file. That leads to the ABI error. If the goal is to remove all the intrinsics, then maybe a better change would be dropping this libatomic check from here completely. WDYT?