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 18D7942F69; Fri, 28 Jul 2023 11:17:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0112840685; Fri, 28 Jul 2023 11:17:38 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id CDB024021E for ; Fri, 28 Jul 2023 11:17:36 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id B32A45C00FC; Fri, 28 Jul 2023 05:17:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 28 Jul 2023 05:17:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1690535853; x=1690622253; bh=lBGHqHnag8eYGUR2Lm1AdgpvCc8aIJbKTtm YWVaRNFw=; b=GNLgam3KWDEJiXBFd58nRLlkD4Ort7EiGD9SZGCzu4s7mK7dIVK +fP6l0tDYvnVSIFgWfNJeCHHocwbdOx2UdomhrCFD6kHDrjSfDFieJvUEb+G0wZf Mtz21L3ZNLP73i97wTnvAifgiw6Y5zOEKZSibCwhwymp6olQ+dVswE+7g5tYPMDE eer1QxPELUAjXcuUvDbUSZs58CdyqfRRBg1GVxlTOm915tJ/IZE9xwzP4oCAumbC oyABSrVG4cFNUaIymQjKUXeu0Upto7aSuHmy93bLUOhahjP2HML+r8JWgv1z/zVo L9BDl7Bo9FA19vFHemaHmGZYesMGOtQIsag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1690535853; x=1690622253; bh=lBGHqHnag8eYGUR2Lm1AdgpvCc8aIJbKTtm YWVaRNFw=; b=LwTcu8mwPCY2hiyOEB3X142B3C/0AE8o0iIdCEtjG4OgVxJLBy2 BWhfplyUP/3DS5k8J569OGf6v9zqZ7ixieTGca2qmNRDKQ/n8KaC5RmTRP4E0U5O WkPmcoFMpct+wd0TcmgPDYWY35XraCC0ytzkxtYkPvJaXbxx/vKd7P4Wz9P5uxf1 FV7GPg7vUl0soUudrCoQOXXwJO6dPTS1+/PccmjOKuUn8GtJmzF7lgqDExXBZ4Ie p0Ja8B1k2KltlwOAxmD16kOV3P2xbixgQ6QYYq1rV6FiD6z8eyr3iSUw8sCR5Pod eECRcbaiJvzE9E82vg/TOJvhiw8F5yVAdVg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrieeigdduvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddtieek gfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 28 Jul 2023 05:17:32 -0400 (EDT) From: Thomas Monjalon To: Ruifeng Wang Cc: david.marchand@redhat.com, dev@dpdk.org, roretzla@linux.microsoft.com, hofors@lysator.liu.se, konstantin.v.ananyev@yandex.ru, honnappa.nagarahalli@arm.com, nd@arm.com Subject: Re: [PATCH v3] eal: add notes to SMP memory barrier APIs Date: Fri, 28 Jul 2023 11:17:31 +0200 Message-ID: <9139635.CDJkKcVGEf@thomas> In-Reply-To: <20230703095642.3326601-1-ruifeng.wang@arm.com> References: <20230621064420.163931-1-ruifeng.wang@arm.com> <20230703095642.3326601-1-ruifeng.wang@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 03/07/2023 11:56, Ruifeng Wang: > The rte_smp_xx() APIs are deprecated. But it is not mentioned > in the function header. > Added notes in function header for clarification. > > Signed-off-by: Ruifeng Wang > --- > v3: Added suggested memory ordering semantic for replacement. > Refined deprecation explanation. > v2: Made the notes more specific. > > lib/eal/include/generic/rte_atomic.h | 30 ++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/lib/eal/include/generic/rte_atomic.h b/lib/eal/include/generic/rte_atomic.h > index 58df843c54..aef44e2455 100644 > --- a/lib/eal/include/generic/rte_atomic.h > +++ b/lib/eal/include/generic/rte_atomic.h > @@ -55,6 +55,14 @@ static inline void rte_rmb(void); > * Guarantees that the LOAD and STORE operations that precede the > * rte_smp_mb() call are globally visible across the lcores > * before the LOAD and STORE operations that follows it. > + * > + * @note > + * This function is deprecated. > + * It provides similar synchronization primitive as atomic fence, > + * but has different syntax and memory ordering semantic. Hence > + * deprecated for the simplicity of memory ordering semantics in use. > + * > + * rte_atomic_thread_fence(__ATOMIC_ACQ_REL) should be used instead. > */ > static inline void rte_smp_mb(void); > > @@ -64,6 +72,17 @@ static inline void rte_smp_mb(void); > * Guarantees that the STORE operations that precede the > * rte_smp_wmb() call are globally visible across the lcores > * before the STORE operations that follows it. > + * > + * @note > + * This function is deprecated. > + * It provides similar synchronization primitive as atomic fence, > + * but has different syntax and memory ordering semantic. Hence > + * deprecated for the simplicity of memory ordering semantics in use. > + * > + * rte_atomic_thread_fence(__ATOMIC_RELEASE) should be used instead. > + * The fence also guarantees LOAD operations that precede the call > + * are globally visible across the lcores before the STORE operations > + * that follows it. > */ > static inline void rte_smp_wmb(void); > > @@ -73,6 +92,17 @@ static inline void rte_smp_wmb(void); > * Guarantees that the LOAD operations that precede the > * rte_smp_rmb() call are globally visible across the lcores > * before the LOAD operations that follows it. > + * > + * @note > + * This function is deprecated. > + * It provides similar synchronization primitive as atomic fence, > + * but has different syntax and memory ordering semantic. Hence > + * deprecated for the simplicity of memory ordering semantics in use. > + * > + * rte_atomic_thread_fence(__ATOMIC_ACQUIRE) should be used instead. > + * The fence also guarantees LOAD operations that precede the call > + * are globally visible across the lcores before the STORE operations > + * that follows it. > */ > static inline void rte_smp_rmb(void); > ///@} There was no more comment. Applied, thanks.