From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0073.outbound.protection.outlook.com [157.56.110.73]) by dpdk.org (Postfix) with ESMTP id 7A7F18E6C for ; Mon, 2 Nov 2015 06:53:32 +0100 (CET) Received: from SN1PR0701MB1983.namprd07.prod.outlook.com (10.163.131.22) by SN1PR0701MB1997.namprd07.prod.outlook.com (10.163.131.24) with Microsoft SMTP Server (TLS) id 15.1.312.18; Mon, 2 Nov 2015 05:53:31 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@caviumnetworks.com; Received: from localhost.localdomain (122.167.182.182) by SN1PR0701MB1983.namprd07.prod.outlook.com (10.163.131.22) with Microsoft SMTP Server (TLS) id 15.1.312.18; Mon, 2 Nov 2015 05:53:26 +0000 Date: Mon, 2 Nov 2015 11:23:05 +0530 From: Jerin Jacob To: Jan Viktorin Message-ID: <20151102055304.GB17659@localhost.localdomain> References: <5289220.BuGOiUSaJq@xps13> <1446164742-29546-1-git-send-email-viktorin@rehivetech.com> <1446164742-29546-2-git-send-email-viktorin@rehivetech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1446164742-29546-2-git-send-email-viktorin@rehivetech.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [122.167.182.182] X-ClientProxiedBy: MA1PR01CA0022.INDPRD01.PROD.OUTLOOK.COM (25.164.117.29) To SN1PR0701MB1983.namprd07.prod.outlook.com (25.163.131.22) X-Microsoft-Exchange-Diagnostics: 1; SN1PR0701MB1983; 2:xGeU1EkBiMNtikNNzrltch3urwjMEZyHF4/ksnlgvGju9+oaC5LJZzOEp2hC9zClN21p2Fir7++M849fpvWrZWk/uOHos2v8ajKz2uGj86EoFHH5xTpMOestDKdu9JrsQUqLoF9o+MgDKpcSP6BvWohgVKwnVU4ZhDKKjxW6B4I=; 3:EHD+xpxbgUErLz57YbI1xOqHzhL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ICmqv+xp4eYoK78Nnx7n0IqjVe+oMgeerho= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(10201501046)(3002001); SRVR:SN1PR0701MB1983; BCL:0; PCL:0; RULEID:; SRVR:SN1PR0701MB1983; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0701MB1983; 4:y3KstV4FJ19TByIrMKzayEnN2ESiJoAcFrVPnUbBL1obgNJ0BudFQKYH5eO8VIyLTG9PK4cf2+um6RbThrQakJp8merN5Lw7hWCEkqoHgTDiO8Fq4b1Myq/rLZbeiHk90YO/MKc6v50oCFCaLHP+ySABsOoeYF4C3++UgOZhfSOTWttjXEmwICd6kbIlgEyMiHIEobCXpacOHIq/37NaXvA9wPvVVvEyPVgsyVHzm8higOqcWNbZ+Y63SIXCKg+fQsa052PUQ+PQ3IM3zaXmnx6mu1HANnvs+HY3NDXF1qOkAa7drkLbsTxKAImE5hJcaYY+rLJ63tQP2U9CkPU10VixbH6wTH+t8QBpzXltl7gCvSOMo62T3Xu9j4sEuF/E X-Forefront-PRVS: 0748FF9A04 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(189002)(199003)(24454002)(77096005)(4001350100001)(81156007)(66066001)(47776003)(2950100001)(50986999)(97736004)(97756001)(54356999)(76176999)(110136002)(40100003)(5001960100002)(101416001)(122386002)(86362001)(46406003)(105586002)(23726002)(92566002)(33656002)(5008740100001)(106356001)(189998001)(83506001)(19580395003)(61506002)(5004730100002)(19580405001)(50466002)(42186005)(87976001)(5007970100001)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0701MB1983; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?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i3E65Icq1I7u+ifkV92kAeGp9+CC/OWOVN?= =?us-ascii?Q?iW3cIWjlLUrp+aNoe4HZIYPGqCVShEoUBHGK5KYp3BO/q8/zqyO4/5to45xA?= =?us-ascii?Q?1gGD563XDZT61sJhJE1XJOkEJdOPUXNTPKV42k5Unzrd7SvRA5KKTdx51+cp?= =?us-ascii?Q?M5Qk8e+Wu2lH4BlmCpn+de2cKK5Tz0VZIXSBDXmeFheoAyjgBhLn4DRwQ/lk?= =?us-ascii?Q?YHkoX3aqBKPiUEIM9vToDpl1cFfrK?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR0701MB1983; 5:4UdpXphDQbGYLWq8vDpao0eTfITH5+Xe9vlZfe8TWin6yTY/mEgx17an0QHO9ZUjjIXzec6aPJl0Tc1mLNIhPqi5nxs+79TxMPPBchHttrg9rHWBoYO7X8aJa6n0tZVxzyytJnJdTvcL8fCjflcU0g==; 24:h4jpL87wd5g3Lgm4BkjGY/ac4r5GW632bIU5f0oizu9bRTzkAGV9fazN6+tUrlt9dQciSU/mjPdaeeJb4DySbAqBWQi1BeVmDjsomKxqtZc=; 20:RvNTRBZjvd6EE4W1Xys5hYsQ9ePP17zRNnmbRROnN1MdDHw5edUfMEfHuPLHZsdBWJP2ZiVFGpmOnoUDvTZVIQ== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2015 05:53:26.8958 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0701MB1983 X-Microsoft-Exchange-Diagnostics: 1; SN1PR0701MB1997; 2:wYM63kE2ooNIhMcN1/5nZVaLuFbsmzejed8AYKo7PR5vHTX6ACnnwsfGde0NLf8GnVOBAB6CS34FztzUfioMi8PYugB83ridivbxKXFVZLpLqW6kQ/vGykcNKro/fManKGjfdwwZUAVvageIfOtR5Xy8zLys1sJs6Ap9FLD0uBA=; 23:ejKaInGPzJkRttBJLTgbu0HfiUfafcqNXEb+y1KDAXsFi/dbgLCiCK7HNlx5hHtHzVZss5D5Ok+CKDBx3S9XxkvkykhsoaTcWsSEkQgz+ydd2Ixvq4sCuDjUMk+NyxmZnkwsiG/RlM/iZyQhhN4vMg0lHkYEwJJ5i5ZnYCevoNsawmX9CTwt18t8rYSEB/Fg X-OriginatorOrg: caviumnetworks.com Cc: Vlastimil Kosar , dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v5 01/15] eal/arm: atomic operations for ARM X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 05:53:33 -0000 On Fri, Oct 30, 2015 at 01:25:28AM +0100, Jan Viktorin wrote: > From: Vlastimil Kosar > > This patch adds architecture specific atomic operation file > for ARM architecture. It utilizes compiler intrinsics only. > > Signed-off-by: Vlastimil Kosar > Signed-off-by: Jan Viktorin > --- > v1 -> v2: > * improve rte_wmb() > * use __atomic_* or __sync_*? (may affect the required GCC version) > > v4: > * checkpatch complaints about volatile keyword (but seems to be OK to me) > * checkpatch complaints about do { ... } while (0) for single statement > with asm volatile (but I didn't find a way how to write it without > the checkpatch complaints) > * checkpatch is now happy with whitespaces > --- > .../common/include/arch/arm/rte_atomic.h | 256 +++++++++++++++++++++ > 1 file changed, 256 insertions(+) > create mode 100644 lib/librte_eal/common/include/arch/arm/rte_atomic.h > > diff --git a/lib/librte_eal/common/include/arch/arm/rte_atomic.h b/lib/librte_eal/common/include/arch/arm/rte_atomic.h > new file mode 100644 > index 0000000..ea1e485 > --- /dev/null > +++ b/lib/librte_eal/common/include/arch/arm/rte_atomic.h > @@ -0,0 +1,256 @@ > +/*- > + * BSD LICENSE > + * > + * Copyright(c) 2015 RehiveTech. All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * > + * * Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * * Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in > + * the documentation and/or other materials provided with the > + * distribution. > + * * Neither the name of RehiveTech nor the names of its > + * contributors may be used to endorse or promote products derived > + * from this software without specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + */ > + > +#ifndef _RTE_ATOMIC_ARM_H_ > +#define _RTE_ATOMIC_ARM_H_ > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +#include "generic/rte_atomic.h" > + > +/** > + * General memory barrier. > + * > + * Guarantees that the LOAD and STORE operations generated before the > + * barrier occur before the LOAD and STORE operations generated after. > + */ > +#define rte_mb() __sync_synchronize() > + > +/** > + * Write memory barrier. > + * > + * Guarantees that the STORE operations generated before the barrier > + * occur before the STORE operations generated after. > + */ > +#define rte_wmb() do { asm volatile ("dmb st" : : : "memory"); } while (0) > + > +/** > + * Read memory barrier. > + * > + * Guarantees that the LOAD operations generated before the barrier > + * occur before the LOAD operations generated after. > + */ > +#define rte_rmb() __sync_synchronize() > + #define dmb(opt) asm volatile("dmb " #opt : : : "memory") static inline void rte_mb(void) { dmb(ish); } static inline void rte_wmb(void) { dmb(ishst); } static inline void rte_rmb(void) { dmb(ishld); } For armv8, it make sense to have above definition for rte_*mb(). If does n't make sense for armv7 then we need split this file rte_atomic_32/64.h > +/*------------------------- 16 bit atomic operations -------------------------*/ > + > +#ifndef RTE_FORCE_INTRINSICS > +static inline int > +rte_atomic16_cmpset(volatile uint16_t *dst, uint16_t exp, uint16_t src) > +{ > + return __atomic_compare_exchange(dst, &exp, &src, 0, __ATOMIC_ACQUIRE, > + __ATOMIC_ACQUIRE) ? 1 : 0; > +} IMO, it should be __ATOMIC_SEQ_CST be instead of __ATOMIC_ACQUIRE. __ATOMIC_ACQUIRE works in conjunction with __ATOMIC_RELEASE. AFAIK, DPDK atomic api expects full barrier. C11 memory model not yet used. So why can't we use RTE_FORCE_INTRINSICS based generic implementation. Same holds true for spinlock implementation too(i.e using RTE_FORCE_INTRINSICS). Am I missing something here ? > + > +static inline int rte_atomic16_test_and_set(rte_atomic16_t *v) > +{ > + return rte_atomic16_cmpset((volatile uint16_t *)&v->cnt, 0, 1); > +} > + > +static inline void > +rte_atomic16_inc(rte_atomic16_t *v) > +{ > + __atomic_add_fetch(&v->cnt, 1, __ATOMIC_ACQUIRE); > +} > + > +static inline void > +rte_atomic16_dec(rte_atomic16_t *v) > +{ > + __atomic_sub_fetch(&v->cnt, 1, __ATOMIC_ACQUIRE); > +} > + > +static inline int rte_atomic16_inc_and_test(rte_atomic16_t *v) > +{ > + return (__atomic_add_fetch(&v->cnt, 1, __ATOMIC_ACQUIRE) == 0); > +} > + > +static inline int rte_atomic16_dec_and_test(rte_atomic16_t *v) > +{ > + return (__atomic_sub_fetch(&v->cnt, 1, __ATOMIC_ACQUIRE) == 0); > +} > + > +/*------------------------- 32 bit atomic operations -------------------------*/ > + > +static inline int > +rte_atomic32_cmpset(volatile uint32_t *dst, uint32_t exp, uint32_t src) > +{ > + return __atomic_compare_exchange(dst, &exp, &src, 0, __ATOMIC_ACQUIRE, > + __ATOMIC_ACQUIRE) ? 1 : 0; > +} > + > +static inline int rte_atomic32_test_and_set(rte_atomic32_t *v) > +{ > + return rte_atomic32_cmpset((volatile uint32_t *)&v->cnt, 0, 1); > +} > + > +static inline void > +rte_atomic32_inc(rte_atomic32_t *v) > +{ > + __atomic_add_fetch(&v->cnt, 1, __ATOMIC_ACQUIRE); > +} > + > +static inline void > +rte_atomic32_dec(rte_atomic32_t *v) > +{ > + __atomic_sub_fetch(&v->cnt, 1, __ATOMIC_ACQUIRE); > +} > + > +static inline int rte_atomic32_inc_and_test(rte_atomic32_t *v) > +{ > + return (__atomic_add_fetch(&v->cnt, 1, __ATOMIC_ACQUIRE) == 0); > +} > + > +static inline int rte_atomic32_dec_and_test(rte_atomic32_t *v) > +{ > + return (__atomic_sub_fetch(&v->cnt, 1, __ATOMIC_ACQUIRE) == 0); > +} > + > +/*------------------------- 64 bit atomic operations -------------------------*/ > + > +static inline int > +rte_atomic64_cmpset(volatile uint64_t *dst, uint64_t exp, uint64_t src) > +{ > + return __atomic_compare_exchange(dst, &exp, &src, 0, __ATOMIC_ACQUIRE, > + __ATOMIC_ACQUIRE) ? 1 : 0; > +} > + > +static inline void > +rte_atomic64_init(rte_atomic64_t *v) > +{ > + int success = 0; > + uint64_t tmp; > + > + while (success == 0) { > + tmp = v->cnt; > + success = rte_atomic64_cmpset( > + (volatile uint64_t *)&v->cnt, tmp, 0); > + } > +} > + > +static inline int64_t > +rte_atomic64_read(rte_atomic64_t *v) > +{ > + int success = 0; > + uint64_t tmp; > + > + while (success == 0) { > + tmp = v->cnt; > + /* replace the value by itself */ > + success = rte_atomic64_cmpset( > + (volatile uint64_t *) &v->cnt, tmp, tmp); > + } > + return tmp; > +} This will be overkill for arm64. Generic implementation has __LP64__ based check for 64bit platform > + > +static inline void > +rte_atomic64_set(rte_atomic64_t *v, int64_t new_value) > +{ > + int success = 0; > + uint64_t tmp; > + > + while (success == 0) { > + tmp = v->cnt; > + success = rte_atomic64_cmpset( > + (volatile uint64_t *)&v->cnt, tmp, new_value); > + } > +} > + > +static inline void > +rte_atomic64_add(rte_atomic64_t *v, int64_t inc) > +{ > + __atomic_fetch_add(&v->cnt, inc, __ATOMIC_ACQUIRE); > +} > + > +static inline void > +rte_atomic64_sub(rte_atomic64_t *v, int64_t dec) > +{ > + __atomic_fetch_sub(&v->cnt, dec, __ATOMIC_ACQUIRE); > +} > + __atomic_fetch_* operations on 64bit works only when compiler support (__GCC_ATOMIC_LLONG_LOCK_FREE >=2). if DPDK API's expects full barrier not the C11 memory model based __ATOMIC_ACQUIRE then better to use generic implementation. > +static inline void > +rte_atomic64_inc(rte_atomic64_t *v) > +{ > + __atomic_fetch_add(&v->cnt, 1, __ATOMIC_ACQUIRE); > +} > + > +static inline void > +rte_atomic64_dec(rte_atomic64_t *v) > +{ > + __atomic_fetch_sub(&v->cnt, 1, __ATOMIC_ACQUIRE); > +} > + > +static inline int64_t > +rte_atomic64_add_return(rte_atomic64_t *v, int64_t inc) > +{ > + return __atomic_add_fetch(&v->cnt, inc, __ATOMIC_ACQUIRE); > +} > + > +static inline int64_t > +rte_atomic64_sub_return(rte_atomic64_t *v, int64_t dec) > +{ > + return __atomic_sub_fetch(&v->cnt, dec, __ATOMIC_ACQUIRE); > +} > + > +static inline int rte_atomic64_inc_and_test(rte_atomic64_t *v) > +{ > + return (__atomic_add_fetch(&v->cnt, 1, __ATOMIC_ACQUIRE) == 0); > +} > + > +static inline int rte_atomic64_dec_and_test(rte_atomic64_t *v) > +{ > + return (__atomic_sub_fetch(&v->cnt, 1, __ATOMIC_ACQUIRE) == 0); > +} > + > +static inline int rte_atomic64_test_and_set(rte_atomic64_t *v) > +{ > + return rte_atomic64_cmpset((volatile uint64_t *)&v->cnt, 0, 1); > +} > + > +/** > + * Atomically set a 64-bit counter to 0. > + * > + * @param v > + * A pointer to the atomic counter. > + */ > +static inline void rte_atomic64_clear(rte_atomic64_t *v) > +{ > + rte_atomic64_set(v, 0); > +} > +#endif > + > +#ifdef __cplusplus > +} > +#endif > + > +#endif /* _RTE_ATOMIC_ARM_H_ */ > -- > 2.6.1 >