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 85D17A034E; Thu, 20 Jan 2022 15:51:45 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1ADEA426F6; Thu, 20 Jan 2022 15:51:45 +0100 (CET) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30067.outbound.protection.outlook.com [40.107.3.67]) by mails.dpdk.org (Postfix) with ESMTP id 38C5840042 for ; Thu, 20 Jan 2022 15:51:44 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SvyK9fTNFz7H4dJSgolwPlEnDDWxV09pnJjb0EjhHSg5dXrprxC9R1T5J9B4qoH2xjLnJz5//8kuoqxlWwBL0vIa3/FlmlGjj+Cq3DUPWvV/ELs8U/Y0cIEm3jnhETwpSPNtEuW+IeMDOC2/ntFUlQae5snJuEHuGU5bUiZhOSx0PZ+FrkeO5TnjxgATtnzIiXbKz6/z7LEkAesc0elAKURxJVyQLiW0DmK5e0T8LIqQa4CfqIPiGYCXJ0Fc3ImgFZWej/ajrdyzYUfcDe1LCSph366BG8pwSkTdRhKFuA5DCfnfIB3HQOSUqJBe1SJVrRJsss0OEcEhBuyNha2sOw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KGMWmAAvFcxW/87nxGdxvRxzG3UzoP/QsZ7hwRnK7g8=; b=J9dkjqvAu9ORewdFKHPU2aS0VF2kY0gigfnK1eg6/Q8O5HNvyYSd6pTZ4yaV9oG/YHD09Zl7VZPPRjlXGUGr3XDSFw2zVBCWABKFdNpafFKJkxd8u39H09U1snmwsFB+1EEa/01VKz3bhsPw6CcNW0mrV78Pb0OW8bE7yjGIRFg54MA0v0ntvHtMYq5UGY/MZCOWzG1LXK4/G5IuLjCY4iXgBKnMEHR6CPhp6GT0TxL99fCZxS7QBJMeSVInPYgJTSc344dkRT5GBdB3CdOaYXqXgyqy3xX3UGU93PqRT+O4uVsIIvXwlB0NGVjtpGM53ChGzSgeixbuhk0uK6dCyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KGMWmAAvFcxW/87nxGdxvRxzG3UzoP/QsZ7hwRnK7g8=; b=JMVD8YbQ1zqUtOy7KzJVuA1tSgN7RRwlaxRZGEGUNyTv4c1hrM0yGO7rQz2VKS3mt+1opdzy1PnD8vAYpB+sW3tBcrVw8KoAFBgBMr6fBEvlI2paVa73gvCTps/Yq2dDuXgKZynPVvlMDO734ab4ejkeRucdv0W30qwOEuvjekk= Received: from VE1PR04MB6509.eurprd04.prod.outlook.com (2603:10a6:803:125::11) by HE1PR04MB3036.eurprd04.prod.outlook.com (2603:10a6:7:1f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.8; Thu, 20 Jan 2022 14:51:42 +0000 Received: from VE1PR04MB6509.eurprd04.prod.outlook.com ([fe80::71d1:da92:9df6:1cf1]) by VE1PR04MB6509.eurprd04.prod.outlook.com ([fe80::71d1:da92:9df6:1cf1%3]) with mapi id 15.20.4888.014; Thu, 20 Jan 2022 14:51:41 +0000 From: Rohit Raj To: Thomas Monjalon CC: Bruce Richardson , Ray Kinsella , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam , "dev@dpdk.org" , Nipun Gupta , Sachin Saxena , Hemant Agrawal , "ferruh.yigit@intel.com" , "david.marchand@redhat.com" Subject: RE: [EXT] Re: [PATCH v5 1/2] eal: add API for bus close Thread-Topic: [EXT] Re: [PATCH v5 1/2] eal: add API for bus close Thread-Index: AQHYBeKgMfxVZS1N6Ee+YCJJmZOw46xqM8mAgAHavwA= Date: Thu, 20 Jan 2022 14:51:41 +0000 Message-ID: References: <20201008153048.19369-1-rohit.raj@nxp.com> <20220110052627.22577-1-rohit.raj@nxp.com> <8133639.5OynTdThKG@thomas> In-Reply-To: <8133639.5OynTdThKG@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: add77116-38a5-4919-f1e1-08d9dc245ef4 x-ms-traffictypediagnostic: HE1PR04MB3036:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: /Z4QKXNPjRqbiVYafK2pcSbozCssA+akJhzi7Frd6U/Wa+gNvuJoSYWDwG6akEzUXjkKkdPxxXe846D/rhM8AnN0Vk0j+JtDOkPp17NBTqmEXnvyPfzxcNAtbPYi0vXJp9727kOeuvVwrmNO1aDHu+SVskQFywCat09GHObShoydvCIwV1Mr+yRU0ILOpUbEHIXHJX2/pDNrmuXnt8YOGnud7qF+lKM34QjAZeuzwFLoFO1lTqflQNg9+EywX4mVQSvj10EzO/QlQo4yQP+GwQ1apHJdJj1wq/AD+17L1E9oLUhVikCJt1NHKDcGSoYzMk/XQMxnyPNSDr5geEsvprCzHt3ylUfYC5nPi79EcO9ODwa7rsxyo0wivB3metZSEl2Sbe8zF3O+/i9NHekC7rRlTyrWThkIyDM5WckxdYXLtniWPZcmAcRI1qmQDx2M2/HvH/ZsiG++qARSzyjuObRSNNESZhuyM9PYJojUO74aU2y3I/faDcRQyO8f3m3jdpqxNmumfKwGsmrOa7yWVfA4jTr58BmQDzXoDB63OTW3QXHJX/zN0sSVfFU1Xjo2oW34VBiM0/QUr+OzTWLKobDunuUoMQMxxOWoidpwBZh7oKzf36dfDspxVPjAeWz3iTO5H4wSSHBLwFMpOwTFzW+nSAmCPDjF3v/IeoryxmzxozfGWcqqOq+tLnFoQuzKqj0XTl8gkdNLgtlIJ+isZA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6509.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(8676002)(2906002)(508600001)(44832011)(7696005)(38100700002)(26005)(4326008)(83380400001)(38070700005)(6916009)(66446008)(86362001)(52536014)(66556008)(53546011)(66946007)(55016003)(33656002)(64756008)(71200400001)(316002)(122000001)(186003)(8936002)(9686003)(5660300002)(54906003)(66476007)(7416002)(76116006)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?AZI4rtdtJSepaGzcPPfCEiXdmpB5FF8Nytq5YJj90J30F0bKolz/+6XFu8/e?= =?us-ascii?Q?R/PWfLZUlmMjxtMC0WVYR8fTpuWgT7hFJ+fSu93qWxO8JvY9QZKZixOTrQed?= =?us-ascii?Q?0uSuNET8MNPqfYAoqReeVfQf1Q1DqxsyXKfYR8IKCIUAKzsrPyCDlhViZEBt?= =?us-ascii?Q?ZwnQ+H7sRYI3ntMPWCTAjCr3UbvjE0l7UWswn2DMgGRk4O4PAUYC9tc+OJvh?= =?us-ascii?Q?SIYg5oSxIcgP3mTwxAIlupImRZh1r3pRTx8s6/8eJ1DcfjMlxemOuNd+4OpA?= =?us-ascii?Q?r73Z3gJ0Mtys7L+LE1Jk2jrNsJoZ3Aq11/clUvnJK53K4URERVJIqtj+Jadv?= =?us-ascii?Q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deQX36RQJXu5S?= =?us-ascii?Q?2gcObBHvNBB63Bjwur4Tnc6aqy8+UmZ6DxCVjzZA/cZMIqzNn4oaEFZDxghg?= =?us-ascii?Q?GLFbRZcT8Emj/StOBMQDtaFVzhkAJoYbsHiVEqA3WFOyU6zuLz0x+NoWHUFv?= =?us-ascii?Q?or4jE/p/3aDAAkx6FYPKnUb4pZgSQW1R+b8sba6GO3cbZLJWVK48kGs0GOVG?= =?us-ascii?Q?xeIXz4NuMAMaEsibL/5H2tLZva7FRVtFvaYZJtE7Alb6UUyRhq6WscRr/5FU?= =?us-ascii?Q?PqHIaM24CzbQKocDIYvwfBA92v2NNyvIXLt5sk1IIYHGZse6ty8xconKr0mp?= =?us-ascii?Q?2E/1iemsddxyywZTDD8lv5+kti1de2iXrUn5ZhICv6kZ8KYr+37Dt61oKGxA?= =?us-ascii?Q?1Q=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6509.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: add77116-38a5-4919-f1e1-08d9dc245ef4 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jan 2022 14:51:41.8742 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: RuNCqY56zCPTLy2xxu+8gN+fgH4hH/d1HxGj2R9O7l/rubqi564uvIErIx2P2ivsEncbzNm0jKQ41b1dof4WTA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB3036 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 Hi Thomas, This "rte_bus_close" API is introduced to do the opposite of what "rte_bus_= probe" does. Just like there are plug and unplug APIs for plugging and unpl= ugging a single device. The API you mentioned, "rte_dev_remove" supports only rte_device. But we a= lso need to close/remove private devices of dpaa and fslmc buses which are = not exposed directly to user (eg: mempool device).=20 Note that these private devices/bus objects are not associated with a parti= cular rte_device but they are available as a resource to be used by any of = the device based on these hardware specific buses.=20 So, to close these devices, we need a new API which can do this for us. Tha= t is why "rte_bus_close" is required. Regards, Rohit Raj > -----Original Message----- > From: Thomas Monjalon > Sent: Wednesday, January 19, 2022 4:02 PM > To: Rohit Raj > Cc: Bruce Richardson ; Ray Kinsella > ; Dmitry Kozlyuk ; Narcisa Ana > Maria Vasile ; Dmitry Malloy > ; Pallavi Kadam ; > dev@dpdk.org; Nipun Gupta ; Sachin Saxena > ; Hemant Agrawal ; > ferruh.yigit@intel.com; david.marchand@redhat.com > Subject: [EXT] Re: [PATCH v5 1/2] eal: add API for bus close >=20 > Caution: EXT Email >=20 > Hi, >=20 > 10/01/2022 06:26, rohit.raj@nxp.com: > > From: Rohit Raj > > > > As per the current code we have API for bus probe, but the bus close > > API is missing. This breaks the multi process scenarios as objects are > > not cleaned while terminating the secondary processes. > > > > This patch adds a new API rte_bus_close() for cleanup of bus objects > > which were acquired during probe. >=20 > I don't understand how closing all devices of a bus will help better than= just > closing all devices. >=20 > As Ferruh already suggested in the past, we could force closing all devic= es in > rte_eal_cleanup(). > And we already have the function rte_dev_remove(). >=20 >=20