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 4EF9545AC8; Sun, 6 Oct 2024 16:30:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 266304025F; Sun, 6 Oct 2024 16:30:06 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id F24854025D for ; Sun, 6 Oct 2024 16:30:04 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id C580E20EDB; Sun, 6 Oct 2024 16:30:04 +0200 (CEST) Subject: RE: [PATCH v12 1/4] lib: add generic support for reading PMU events MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Date: Sun, 6 Oct 2024 16:30:03 +0200 Content-Transfer-Encoding: quoted-printable Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F782@smartserver.smartshare.dk> Content-class: urn:content-classes:message In-Reply-To: <20240927220630.1802971-2-tduszynski@marvell.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v12 1/4] lib: add generic support for reading PMU events Thread-Index: AdsRKaDml8Jc6XVpTKGNXFGpmHGsrAG0WgfA X-MimeOLE: Produced By Microsoft Exchange V6.5 References: <20230216175502.3164820-1-tduszynski@marvell.com> <20240927220630.1802971-1-tduszynski@marvell.com> <20240927220630.1802971-2-tduszynski@marvell.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Tomasz Duszynski" Cc: , , , , , , , , , 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 > From: Tomasz Duszynski [mailto:tduszynski@marvell.com] > Sent: Saturday, 28 September 2024 00.06 > +int > +rte_pmu_init(void) > +{ > + int ret; > + > + /* Allow calling init from multiple contexts within a single > thread. This simplifies > + * resource management a bit e.g in case fast-path tracepoint has > already been enabled > + * via command line but application doesn't care enough and > performs init/fini again. > + */ > + if (rte_pmu.initialized !=3D 0) { > + rte_pmu.initialized++; This increment is not multithread safe, does it need to be? Same about the decrement in rte_pmu_fini(). > + return 0; > + } With the above fixed, or if it doesn't need fixing, For the series, Acked-by: Morten Br=F8rup Thank you for resuming work on this. :-)