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 44315A0350; Mon, 29 Jun 2020 10:59:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0656D2C01; Mon, 29 Jun 2020 10:59:41 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 2674B1023 for ; Mon, 29 Jun 2020 10:59:38 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05T8pbMZ014259; Mon, 29 Jun 2020 01:59:35 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=njwt7miV3AnJDQZdXYXQ1BxGcbJxs7HrioUisajk8Xs=; b=k6p747LUBIBab7Vy4sQ1vKvVJ1/FIwBFAESQQSLi9i8OEocAtl8PgaAwJzCXYY9YCne6 lYdwpGEF9heM8VOymXhgTDYh/MWOOfd2pCrVjS0VJG0Mcc3KLcxw4PbgM8PtjuLsWm4c KWmhiWkeI+xzXnR3uhHBjjNkXNS6SaQMFlc9XZj7G/hM4TUVYBrW2Zw1Woca45rTUohH xqnNFiLJE+OHmXDIY++sZwodpxMNMj1tX9J/m8PJZC0Aq9jr6po3yNqVTHUDOITCeuYZ FisNUXTTFvYYJO3VmCvBQ7dKg0i7vFplIV/YESTLJb9GfQT1AFhuELqpksU5IuOvnpbR kg== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 31y0wrt3x8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 29 Jun 2020 01:59:35 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 29 Jun 2020 01:59:34 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.108) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Mon, 29 Jun 2020 01:59:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dfzXm5Pfiz/Ae3Zl6M8JvzvkXnrr9wikglYyLVYMbV5QX4mo/sCq6y1Vu7f27wysxfHcKr9O5EzN2nWlt59P2DBZJCstyOq54H/3IGoJVH3ph98k8HBDIsnNZuPt6RLErTexPtfTZsrJ7LRXdv3baZFk+mf64uD9aZCC/EEfZ8FcuGZYPKw2OxtYhB/CluHicr/f9XR79ILox8MnMrx2Q2Nu7yTaLZt38avC1R4K8b1zKhPML2mQ9w7DYJzNKzmgIzAxRjgB++VAu/+b/2TWWy+azuD9eKS3QiE0ObPt5y1n9iMIezLy2bazJMf0QAyfm+mnuMpKKpIniFYzvXBuRg== 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=njwt7miV3AnJDQZdXYXQ1BxGcbJxs7HrioUisajk8Xs=; b=JK3BlKuY0DT/iSQ23CgPcQDNrcMBD1dcua+gIB6HKe2uXunj3M61HjJ2/7/Xd/m2M2YHsQJd0rHv81XFBbSljdKcIOie7h1mynQq3uG8dheRt654Rqq/s7q+8WDhnQW36/l2m+1jqdZ/NkyTzkPnAPhtC1/l8pfZo9UlOcJmKV+gEYL7pkybfEHzXHRU1QWOg5ymv+fXTlnvxLSmrMzj9DL8kIhXoPUSG3haTXpOuxk0rvUIrwHjG11IYRKv7tJFzbe9GczmPOiAij93tG2mtRytiy4Fs30zlUqx3Wc3oljwHMd5Ib36ofxcwkyQ0D0FWYpvT3+9zRHcnTyxp1Oysw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=njwt7miV3AnJDQZdXYXQ1BxGcbJxs7HrioUisajk8Xs=; b=QLF7Wukoi7XMjVXDHfMqWsbLvwxLMs+B0ToQStYnPciLzUFR8BgwRjUyoaWAViiJiH7ITDIcjUmgK7AFneCrbUQJhxUT9sOlh6GKgccbdPoCwp3NWUEiVr4kexWWtwi+fUxVXSWnWAbZwbN40Rs5aEiPyCOavO2zJJxKGuv6WyA= Received: from MWHPR18MB1296.namprd18.prod.outlook.com (2603:10b6:320:2c::11) by MWHPR18MB1150.namprd18.prod.outlook.com (2603:10b6:300:a4::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.26; Mon, 29 Jun 2020 08:59:32 +0000 Received: from MWHPR18MB1296.namprd18.prod.outlook.com ([fe80::b903:1cd5:1605:cc59]) by MWHPR18MB1296.namprd18.prod.outlook.com ([fe80::b903:1cd5:1605:cc59%12]) with mapi id 15.20.3131.026; Mon, 29 Jun 2020 08:59:32 +0000 From: Sunil Kumar Kori To: David Marchand , "dev@dpdk.org" CC: "jerinjacobk@gmail.com" , "bruce.richardson@intel.com" , "mdr@ashroe.eu" , "thomas@monjalon.net" , "arybchenko@solarflare.com" , "ktraynor@redhat.com" , "ian.stokes@intel.com" , "i.maximets@ovn.org" , "Jerin Jacob Kollanukkaran" , Neil Horman , Harini Ramakrishnan , Omar Cardona , Pallavi Kadam , Ranjit Menon Thread-Topic: [EXT] [PATCH v4 4/9] eal: introduce thread uninit helper Thread-Index: AQHWS8jrw4kcAQ9kJkm31jhWvoSL96jvTvYg Date: Mon, 29 Jun 2020 08:59:32 +0000 Message-ID: References: <20200610144506.30505-1-david.marchand@redhat.com> <20200626144736.11011-1-david.marchand@redhat.com> <20200626144736.11011-5-david.marchand@redhat.com> In-Reply-To: <20200626144736.11011-5-david.marchand@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=marvell.com; x-originating-ip: [2401:4900:169f:eee3:7960:2ccb:e799:9703] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1de74660-7a62-4c66-8e0a-08d81c0abd89 x-ms-traffictypediagnostic: MWHPR18MB1150: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-forefront-prvs: 044968D9E1 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: srIF6Pd0dHcGFaoNyWcaRcYUTLyWb9VMq/6xn6s90Uk9QqAkjmzXivPaRCS5PiSGkaNn0JSdfIW9691eBsKcQ+QhJWpz8+dzgFwhkFeYZv9QVZejba0X6JQgXVRiq57DRvGXsPbJZWHlLXag7pmCv50+3MpcGdjIVUCFMD7DWjBKQP1+wOCxVGFQ2UAu4vDCJ8hLIoMfJMt4LVf5kpPkmoEmvXGGk/RacyynBHq10ZUb2CEG9FK4QikJy/qsegw7PB2gl1Wqy5+rLuwzqaL747MNoLnfjNPragGI4ts1oTsBwOZt4mTEMNmhCp8EsHfaZ0sioAEaebWnt6sTtxzSKw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR18MB1296.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(346002)(376002)(39850400004)(366004)(396003)(86362001)(9686003)(8676002)(71200400001)(54906003)(83380400001)(110136005)(55016002)(478600001)(316002)(186003)(7696005)(6506007)(52536014)(7416002)(8936002)(5660300002)(66446008)(66476007)(66556008)(64756008)(33656002)(2906002)(76116006)(66946007)(4326008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: aWmnLMvbHV7LGDmQdTApaRsVzAh0agEZMCKvx88p5oildBBMyE7JftqdfQnKsQmf8A/YxGREOP5NhILv3qHR35OWayEnvl3x44OtASwE7TurJFHcR2qU3pPC96Qv7bNi5lskzTEyahQV0lCLSofngufIQmtgbIYyF+fs3djGB4DKtTIL3TUtw6dZb/txkMnHPj9DPpZzZGZFE0wabIn3C3KTn5kuVqF5gXgRb4FhYrmX3peFxLEcqpUBsvD4VvmpTnVXbtqhnKmrhU8z3K/xdszjYDP3B/T//x1PSq1hgG7REA3VOwRT/aUyX+GCNGuEJoZGh451oMPtuYVL+uJGPA+KP/uqYOpKphtvV9cJNaYjNa/Gr2TVVVo+/hELiCM8fwrm0IrkXJZaqaY0E4eXLbML0WoKs6pltol0/xxwc1mykoX2v81QB0UOJdZfBL+BH7LcXUrtgUh8NEkOksbfVJqDQa/iJOoIgS1eTdPQny2vd4Ir06iWBhW8J0fJBUsj9ZUzr3VpOuoXBCQLSlSqJdCDeoDtT3bp1kRsCNWz+aLhEOs71xaRp2oZwEXCrK13 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR18MB1296.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1de74660-7a62-4c66-8e0a-08d81c0abd89 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jun 2020 08:59:32.6795 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 7yLGfxDkt1AnUn6PtAxH5jEn+uZ4K6xWPmdlvqfMsMo7XN/MAfAcxvNMAklsP8z7W2mMUlOe3/bbA9iKzYfaxQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR18MB1150 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-29_07:2020-06-29, 2020-06-29 signatures=0 Subject: Re: [dpdk-dev] [EXT] [PATCH v4 4/9] eal: introduce thread uninit helper 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: David Marchand >Sent: Friday, June 26, 2020 8:18 PM >To: dev@dpdk.org >Cc: jerinjacobk@gmail.com; bruce.richardson@intel.com; mdr@ashroe.eu; >thomas@monjalon.net; arybchenko@solarflare.com; ktraynor@redhat.com; >ian.stokes@intel.com; i.maximets@ovn.org; Jerin Jacob Kollanukkaran >; Sunil Kumar Kori ; Neil Horman >; Harini Ramakrishnan >; Omar Cardona >; Pallavi Kadam ; >Ranjit Menon >Subject: [EXT] [PATCH v4 4/9] eal: introduce thread uninit helper > >External Email > >---------------------------------------------------------------------- >This is a preparation step for dynamically unregistering threads. > >Since we explicitly allocate a per thread trace buffer in rte_thread_init,= add an >internal helper to free this buffer. > >Signed-off-by: David Marchand >--- >Note: I preferred renaming the current internal function to free all threa= ds >trace buffers (new name trace_mem_free()) and reuse the previous name >(trace_mem_per_thread_free()) when freeing this buffer for a given thread. > >Changes since v2: >- added missing stub for windows tracing support, >- moved free symbol to exported (experimental) ABI as a counterpart of > the alloc symbol we already had, > >Changes since v1: >- rebased on master, removed Windows workaround wrt traces support, > >--- > lib/librte_eal/common/eal_common_thread.c | 9 ++++ >lib/librte_eal/common/eal_common_trace.c | 51 +++++++++++++++++++---- > lib/librte_eal/common/eal_thread.h | 5 +++ > lib/librte_eal/common/eal_trace.h | 2 +- > lib/librte_eal/include/rte_trace_point.h | 9 ++++ > lib/librte_eal/rte_eal_version.map | 3 ++ > lib/librte_eal/windows/eal.c | 5 +++ > 7 files changed, 75 insertions(+), 9 deletions(-) > >diff --git a/lib/librte_eal/common/eal_common_thread.c >b/lib/librte_eal/common/eal_common_thread.c >index afb30236c5..3b30cc99d9 100644 >--- a/lib/librte_eal/common/eal_common_thread.c >+++ b/lib/librte_eal/common/eal_common_thread.c >@@ -20,6 +20,7 @@ > #include "eal_internal_cfg.h" > #include "eal_private.h" > #include "eal_thread.h" >+#include "eal_trace.h" > > RTE_DEFINE_PER_LCORE(unsigned int, _lcore_id) =3D LCORE_ID_ANY; >RTE_DEFINE_PER_LCORE(int, _thread_id) =3D -1; @@ -161,6 +162,14 @@ >rte_thread_init(unsigned int lcore_id, rte_cpuset_t *cpuset) > __rte_trace_mem_per_thread_alloc(); > } > >+void >+rte_thread_uninit(void) >+{ Need to check whether trace is enabled or not similar to trace_mem_free().= =20 >+ __rte_trace_mem_per_thread_free(); >+ >+ RTE_PER_LCORE(_lcore_id) =3D LCORE_ID_ANY; } >+ > struct rte_thread_ctrl_params { > void *(*start_routine)(void *); > void *arg; [snipped] >2.23.0