From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,URIBL_SBL,URIBL_SBL_A autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE665C76188 for ; Mon, 22 Jul 2019 14:43:26 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 4D46F2190D for ; Mon, 22 Jul 2019 14:43:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="J7nyzX+u" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D46F2190D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 020AC1BE1D; Mon, 22 Jul 2019 16:43:25 +0200 (CEST) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50064.outbound.protection.outlook.com [40.107.5.64]) by dpdk.org (Postfix) with ESMTP id 2C1C51BE19 for ; Mon, 22 Jul 2019 16:43:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GxUFyMRvgoBQkZDZ+zzk7+LzOEkM2ObEtxcYoIF+QakfCPOc7vfzaAT1LJZAx7nMfwh7uw8sP3LZE5QUo5hn9t3jdhxkb2OjcZx8Qsohak+yFQVQJWiBJL0aceDPV1UbpANpg2AK08mhWtMVimiygt9UzjSHi1F57RYU91+YZ1dAJpJWJafv+hm5KPt6tMV8zX47kSKpLZMACxb3ek1QHWogFCtBYrSRATKDdQFL0oxV4xxGH05k8p1v0l1Pm/HENJ8DN85KI3miuXtpHIs0lBlyf//00HG66jUdbiCG7fFOuyPDS/gpOy7jUME6S5vrK/C/UsSW7TAdpw5HzrTcpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=v0brkG5KylvLDHFb5KX634WhAw7aYedwWlQq1gUs8zc=; b=ldVcPo5C/t0jB4ScRaxYRQiIt1RF2QJTjuW0PCRT+8+2lzLErEAEx4+asLEOTX1zj9kqI7BVuasXcuaRra3K9mo8n4xZcFeKLXPZ/DIevuFr20Flfbb21vxlUGgauHYpcV+lLXfBmNVV5mM9S3dNCwMaq/rastakIPVlV6y4PggCYoQ9G3u2IHkChKa5GtR0fRjUo1BWqVXS9Hy8vRQJJGuRjwLpI4WGO/ZsI38+oO0GHLRX0hhq2iZXPhXSkzyIPMkcFMNUd1xCq6XZVU+tQB4TO3OxQIoJu7fKUkVPxS6n6JSwMsdiunmrN5fq2JN2igdFjLl9txCYuMB0M0Fs2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=arm.com;dmarc=pass action=none header.from=arm.com;dkim=pass header.d=arm.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=v0brkG5KylvLDHFb5KX634WhAw7aYedwWlQq1gUs8zc=; b=J7nyzX+ubTRNBkTxDiU+elnHcmcHh0cgouu3CuEjv0XaMaiXyTjd1DLQajWI7jS/3ZFlEGX+hvulg+gJpaPAtGyOkVsd7a/WBeNwLpZCUMVkoB1WCELsaKUPCFq7lXAWhChR3bxeXgaoUkU9nFHIYw1K6HoS5tY1PozIXYQkMWw= Received: from VE1PR08MB4640.eurprd08.prod.outlook.com (10.255.27.75) by VE1PR08MB4767.eurprd08.prod.outlook.com (10.255.113.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.16; Mon, 22 Jul 2019 14:43:21 +0000 Received: from VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::f4e4:378b:49d3:d876]) by VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::f4e4:378b:49d3:d876%5]) with mapi id 15.20.2094.013; Mon, 22 Jul 2019 14:43:21 +0000 From: "Phil Yang (Arm Technology China)" To: "Eads, Gage" , "dev@dpdk.org" CC: "thomas@monjalon.net" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , Honnappa Nagarahalli , "Gavin Hu (Arm Technology China)" , nd , nd Thread-Topic: [PATCH v5 3/3] eal/stack: enable lock-free stack for aarch64 Thread-Index: AQHVQJqZNkwMk20vsUqX/ZlTT9M876bWth2w Date: Mon, 22 Jul 2019 14:43:20 +0000 Message-ID: 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> <9184057F7FC11744A2107296B6B8EB1E68D258CA@FMSMSX108.amr.corp.intel.com> In-Reply-To: <9184057F7FC11744A2107296B6B8EB1E68D258CA@FMSMSX108.amr.corp.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 067b6114-0cb4-4018-a11b-8ebbf1879ead.0 authentication-results: spf=none (sender IP is ) smtp.mailfrom=Phil.Yang@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 65e5f5fb-eb08-49e0-ac85-08d70eb2f14a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VE1PR08MB4767; x-ms-traffictypediagnostic: VE1PR08MB4767: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-microsoft-antispam-prvs: nodisclaimer: True x-ms-oob-tlc-oobclassifiers: OLM:4714; x-forefront-prvs: 01068D0A20 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(136003)(376002)(366004)(346002)(396003)(13464003)(189003)(199004)(102836004)(305945005)(486006)(8936002)(74316002)(14454004)(8676002)(81156014)(76176011)(6506007)(55236004)(3846002)(53546011)(478600001)(26005)(6116002)(110136005)(14444005)(476003)(446003)(256004)(7736002)(316002)(7696005)(54906003)(11346002)(186003)(33656002)(4326008)(68736007)(5660300002)(52536014)(66066001)(53936002)(6246003)(71190400001)(71200400001)(66446008)(64756008)(66946007)(66556008)(66476007)(76116006)(229853002)(86362001)(99286004)(81166006)(6436002)(2501003)(25786009)(2906002)(55016002)(9686003); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB4767; H:VE1PR08MB4640.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: WIPse+CmG9h+4E4cEzgWia6CJj+QUQpWE3VXOE4V+Rlpv4OqMggEdMm3D1N+HrLVPhWP2/ESec70CzOM55VQDIlhcSu1/s1nNA0VGaLBlobURXRoOI2Hu619xuiN9wNBZm8Fj1HkJOa7yevOmyC+n0Nkw8GopSJnNJ4k+eA8VOrZE6pdstnW4KnxTpkrivC47oAWVXtLHCQA5Qj7+OBWFmVH8da4HlZgIW/UX0ywPAkDp3AugOzyRt45VCmS2Is8DVR6tZF8q/rp4EDOc9w2ZJjkS+tHVmdulOpPVEvsmV8eAcKd6p9r0fLfJnkvfbUJKeE5p+8ym8oxp0RsHu2j2aZ/bNYykHE6CsGpWByHrv+04Ud24raK4OjP4+yB0CL5t6tiVMD/FPnJbtEpyKWPSLlz+2a6hQdXS8Vj/2JjjZU= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65e5f5fb-eb08-49e0-ac85-08d70eb2f14a X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jul 2019 14:43:20.9845 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Phil.Yang@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4767 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" > -----Original Message----- > From: Eads, Gage > Sent: Monday, July 22, 2019 10:35 PM > To: Phil Yang (Arm Technology China) ; dev@dpdk.org > Cc: thomas@monjalon.net; jerinj@marvell.com; hemant.agrawal@nxp.com; > Honnappa Nagarahalli ; Gavin Hu (Arm > Technology China) ; nd > Subject: RE: [PATCH v5 3/3] eal/stack: enable lock-free stack for aarch64 >=20 > > 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); > > +} >=20 > Since the stub functions are not functional, these comments should be > removed and the function simply return 0. The rte_atomic.h include can be > removed as well. OK. Will do it. Thanks.