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 B5E9043215; Fri, 27 Oct 2023 14:59:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D891410DD; Fri, 27 Oct 2023 14:59:46 +0200 (CEST) Received: from forward502b.mail.yandex.net (forward502b.mail.yandex.net [178.154.239.146]) by mails.dpdk.org (Postfix) with ESMTP id 522EE40A8A for ; Fri, 27 Oct 2023 14:59:44 +0200 (CEST) Received: from mail-nwsmtp-smtp-production-main-38.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-38.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:1116:0:640:d64e:0]) by forward502b.mail.yandex.net (Yandex) with ESMTP id A49BF5EA70; Fri, 27 Oct 2023 15:59:43 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-38.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id ZxQ7YgKWoiE0-AtU6S06C; Fri, 27 Oct 2023 15:59:42 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1698411582; bh=uB0fi6TfHVBWp7f5sQ3136i79UDwnLn/vmt/T0OV3VA=; h=From:In-Reply-To:Cc:Date:References:To:Subject:Message-ID; b=aBGq/g2Oepbf0pYGZ5UaQvdyJqY6QIaPhEFUi+F4dcXHcX4lDoF2B9g+84lQsu6nd maeq7dusGuVieFP8EZJaKAYnoxK1Sd/LDwfLsd4uEOolhEZ4XajPhy7Mzm6SAJC0ES 8RTuyMWZ9HzXNnbYGCeJnl0nKfwXE/d6Yc9dK2vI= Authentication-Results: mail-nwsmtp-smtp-production-main-38.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: Date: Fri, 27 Oct 2023 13:59:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 06/19] ipsec: use rte optional stdatomic API Content-Language: en-US, ru-RU To: Tyler Retzlaff , 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 , 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 References: <1697497745-20664-1-git-send-email-roretzla@linux.microsoft.com> <1698280314-25861-1-git-send-email-roretzla@linux.microsoft.com> <1698280314-25861-7-git-send-email-roretzla@linux.microsoft.com> From: Konstantin Ananyev In-Reply-To: <1698280314-25861-7-git-send-email-roretzla@linux.microsoft.com> Content-Type: text/plain; charset=UTF-8; format=flowed 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 26.10.2023 01:31, Tyler Retzlaff пишет: > Replace the use of gcc builtin __atomic_xxx intrinsics with > corresponding rte_atomic_xxx optional stdatomic API > > Signed-off-by: Tyler Retzlaff > --- > lib/ipsec/ipsec_sqn.h | 2 +- > lib/ipsec/sa.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/ipsec/ipsec_sqn.h b/lib/ipsec/ipsec_sqn.h > index 505950e..984a9dd 100644 > --- a/lib/ipsec/ipsec_sqn.h > +++ b/lib/ipsec/ipsec_sqn.h > @@ -128,7 +128,7 @@ > > n = *num; > if (SQN_ATOMIC(sa)) > - sqn = __atomic_fetch_add(&sa->sqn.outb, n, __ATOMIC_RELAXED) + n; > + sqn = rte_atomic_fetch_add_explicit(&sa->sqn.outb, n, rte_memory_order_relaxed) + n; > else { > sqn = sa->sqn.outb + n; > sa->sqn.outb = sqn; > diff --git a/lib/ipsec/sa.h b/lib/ipsec/sa.h > index ce4af8c..4b30bea 100644 > --- a/lib/ipsec/sa.h > +++ b/lib/ipsec/sa.h > @@ -124,7 +124,7 @@ struct rte_ipsec_sa { > * place from other frequently accessed data. > */ > union { > - uint64_t outb; > + RTE_ATOMIC(uint64_t) outb; > struct { > uint32_t rdidx; /* read index */ > uint32_t wridx; /* write index */ Acked-by: Konstantin Ananyev