From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F06E0A046B for ; Mon, 22 Jul 2019 16:36:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3D82B1BE1C; Mon, 22 Jul 2019 16:36:24 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 188511BE1A for ; Mon, 22 Jul 2019 16:36:21 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jul 2019 07:34:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,295,1559545200"; d="scan'208";a="192739316" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 22 Jul 2019 07:34:37 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jul 2019 07:34:37 -0700 Received: from fmsmsx108.amr.corp.intel.com ([169.254.9.149]) by FMSMSX153.amr.corp.intel.com ([169.254.9.7]) with mapi id 14.03.0439.000; Mon, 22 Jul 2019 07:34:37 -0700 From: "Eads, Gage" To: Phil Yang , "dev@dpdk.org" CC: "thomas@monjalon.net" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , "Honnappa.Nagarahalli@arm.com" , "gavin.hu@arm.com" , "nd@arm.com" Thread-Topic: [PATCH v5 3/3] eal/stack: enable lock-free stack for aarch64 Thread-Index: AQHVQI5RaNllXN25z0qBKWX6z/OspabWsV4g Date: Mon, 22 Jul 2019 14:34:36 +0000 Message-ID: <9184057F7FC11744A2107296B6B8EB1E68D258CA@FMSMSX108.amr.corp.intel.com> References: <1561257671-10316-1-git-send-email-phil.yang@arm.com> <1563800774-2710-1-git-send-email-phil.yang@arm.com> <1563800774-2710-3-git-send-email-phil.yang@arm.com> In-Reply-To: <1563800774-2710-3-git-send-email-phil.yang@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODEyMDk0MzQtODFiNy00YzdlLTlkZWQtMDQwZTViODJhMDczIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZTd5aUpVdE1WdlJ2UHBKSk1wNUc0ZTBKUHFDbU1lV0J4T1dEallJaHJyTnoxUFQzN09BcE5EbGh6eUdZUzh6ZiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.1.200.106] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v5 3/3] eal/stack: enable lock-free stack for aarch64 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > diff --git a/lib/librte_stack/rte_stack_lf_stubs.h > b/lib/librte_stack/rte_stack_lf_stubs.h > new file mode 100644 > index 0000000..d924bc6 > --- /dev/null > +++ b/lib/librte_stack/rte_stack_lf_stubs.h > @@ -0,0 +1,59 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2019 Arm Limited > + */ > + > +#ifndef _RTE_STACK_LF_STUBS_H_ > +#define _RTE_STACK_LF_STUBS_H_ > + > +#include > +#include > + > +static __rte_always_inline unsigned int __rte_stack_lf_count(struct > +rte_stack *s) { > + /* stack_lf_push() and stack_lf_pop() do not update the list's > contents > + * and stack_lf->len atomically, which can cause the list to appear > + * shorter than it actually is if this function is called while other > + * threads are modifying the list. > + * > + * However, given the inherently approximate nature of the > get_count > + * callback -- even if the list and its size were updated atomically, > + * the size could change between when get_count executes and > when the > + * value is returned to the caller -- this is acceptable. > + * > + * The stack_lf->len updates are placed such that the list may appear > to > + * have fewer elements than it does, but will never appear to have > more > + * elements. If the mempool is near-empty to the point that this is a > + * concern, the user should consider increasing the mempool size. > + */ > + return (unsigned int)rte_atomic64_read((rte_atomic64_t *) > + &s->stack_lf.used.len); > +} Since the stub functions are not functional, these comments should be remov= ed and the function simply return 0. The rte_atomic.h include can be remove= d as well.