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 B6964A0A0E; Thu, 13 May 2021 08:47:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A5266410DB; Thu, 13 May 2021 08:47:22 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2050.outbound.protection.outlook.com [40.107.93.50]) by mails.dpdk.org (Postfix) with ESMTP id 6845E4003F; Thu, 13 May 2021 08:47:21 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VGWz5np0M3nXP+nNIV/QF2S8OaJMDt0um4Qgy1o6lTjHjpEKQcECdGmHO4XVvnd37LooQcdPvREB3QecqfiR8fcruI/Z+nNs+EatYy4dbFnFbDIsVj5nCtCGZw4drbvsEB664b6ykElM3K0bAzcWgrcJBXmzK6QKsuUfgBvAg1P2ou9OwHnFc/Jc7LKmEKN+Pb5cSL2lXgpGtOFf43eiSopBuoJVEbIurbmQ0oUDzOLgbPfM+EJB/GWlq9g9mkYWhuIcJYPwKWzqNZ2mfc3CQ0kRkf6+A9L2NJeIQw5rh3DlayPjX+4TvfEDAEczDr2EF7T7bY3Kc8SS7fouhKBM2Q== 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=SDx/c2NcXcMlMXLIdTA7JBkHuoHP4GVLnMb2wwpZYF8=; b=JSvy74nlg2FahepvpM1OHEiuFvzRJ6puOSFMBlsiAZcbm8+Zk8IKUPJEzIg81dBWpFfjOkLHY8WqSzyGaRBz0zDv6E9hRQE+TsOWWi0WEWTeseJe74FZy7AevSNLrxrDrvXzVGsrszmSnuCrz0RERuOJqvpFYGr06L8/h/tiXUHNA0flLBsc1v3Zk/+INaL0BVBopv+ZTDW4Noer+mOXZXq0UcWNmiJkJ8PBZ/ljmEvE5CfAH0QG0gpk84oKA6km1PJArQ2Cr990PuS7waTa6LTkL2ZNju8Y4Lu8iVl6CBbnIxD89X4zCXT3dlisRz+1p6mCkrR3qNlqQ3kIDGcUQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SDx/c2NcXcMlMXLIdTA7JBkHuoHP4GVLnMb2wwpZYF8=; b=PB/21j/M7/T36yxKUBDRwcu05Po5bvL2eS/Nsm+94MFvknE81SvwP1i8SXUBtJWS9jkxnbYfK2dn+bMnoLT59Uix/Bguqb2xJsbFnmrW0w68duZjuH/uPLaTR0mWREF99H4cm8+q4R88qtJbczr11VquHrNt9HxlBY7YbJFN4DSsJ02HGaqYXG+DCrv97gbl+3ip3HBAVTa7W0x2R6T30S5vHwssR7sMQxf40fFaeqe8YmdXWDB31acUK9JGKyuiL5gJAqXA77+ABg2yL86HSJ2qRuMALFkzTsN/g+gQ1SHCnKQGIbWPblzRtonqkLuT5OM0gwAQ8fsnoCMAXILIDw== Received: from DM6PR12MB3753.namprd12.prod.outlook.com (2603:10b6:5:1c7::18) by DM5PR1201MB0268.namprd12.prod.outlook.com (2603:10b6:4:54::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Thu, 13 May 2021 06:47:19 +0000 Received: from DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::c595:e3bc:686c:16a4]) by DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::c595:e3bc:686c:16a4%5]) with mapi id 15.20.4108.031; Thu, 13 May 2021 06:47:19 +0000 From: Slava Ovsiienko To: wangyunjian , "dev@dpdk.org" CC: Matan Azrad , Shahaf Shuler , "dingxiaoxiong@huawei.com" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 2/2] net/mlx5: fix mem leak when a device configured repeatedly Thread-Index: AQHXR6msG9ySNPiie0iS41qPP+vDG6rg+EFQ Date: Thu, 13 May 2021 06:47:19 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [188.163.75.124] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 23c7ce82-a894-4e05-c8dd-08d915daf448 x-ms-traffictypediagnostic: DM5PR1201MB0268: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2331; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ovT6TygKvslXD8AO/JTbvdW/E6lch+uXdjo/wMG2bflvSqz6Rx46MCXbyEbyVIuhHTKk3JSvSy1G523KtAYq+6P3VVrh8id7p/os/D1gH+tirq+HLGkH/rVPtO/V1dU9azVXFhsr4kKyIng1xaezuulPlkdoowQIaaVG507TruC73LwXPuF2adELFQY5nCUOYcC32E8nRmsReTMM+utklAhInEQeV9n0s++2U1c3JccmidWrd6udicx8+GGKTj7O7w0g6rKwlFa3IQvZPWpBbnJkMABS9NT0IFXFt5ysPqnWfyNmv9hNEqO8boxlrn/p56S18xq5Y9bvf12vCaw+lvon83nkSuIVzPV8GB16jQ37Pxl7a4/Yc2GeHgeVV3ToZJ3PSLwexAQ4gC9byIuqYygTvfp+7uHpQn6JJtp4g7fTsLdburGrjxZribpY0c2D8+RkUBYDcW3wMVoqHRxZZ7hSPWR9aU8Ew/IY85FuhvdZnynTzgJQ672qfR5/g6nWJeEjhbR8gbCbTVw8S8yAJt6Wow0HkznjxWQGo6u54gOXLKWBOpz/btKJZnnPys8w1HzhpP7XRbBvH8LhigSHU2vnxAB6wzi23bE9OjVZHwE= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB3753.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(136003)(376002)(346002)(39860400002)(38100700002)(122000001)(4326008)(186003)(86362001)(478600001)(53546011)(55236004)(66446008)(83380400001)(8676002)(5660300002)(33656002)(110136005)(54906003)(8936002)(4744005)(64756008)(2906002)(6506007)(55016002)(9686003)(66476007)(66556008)(76116006)(66946007)(52536014)(7696005)(71200400001)(26005)(316002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?yo2ee8byBiYRsyYV1VPe9lnr3IjuuuxA1+JbiLypMih5MXfJhVZOgY7+YEhg?= =?us-ascii?Q?4kqENqOhy+OLhJwLkzM30ia7B6Zg557Hl9rkiQx+FFRnyCb1Cxv6TMQbHRUG?= =?us-ascii?Q?sB+2fuFVtYTP64joI0hW0zMx6097IZAVPxvg0mWkFZ5FpjQXa1gnPHnGkH5v?= =?us-ascii?Q?wS+0msSJrb5yswwfDcddd7GJWs6WZs0uF302EBtUkj8yRoawmftXcj2edQnp?= =?us-ascii?Q?Ct84kKzLMld8boh/7YoEDD6DZm0eylxMA9ZbjSFwaESE0zGSLospH9IE6cgp?= =?us-ascii?Q?lU2/14QKn/DHFgfFvsaHBkxFtfqnoKI7QfME/91FokmkfOZzkrosfTQ5HxJq?= =?us-ascii?Q?m4oPxTeVojUkxe6bCQEZxa3Eqa9WcvRyPK//B4PuBLxixIBEfzQnDp1yPj9d?= =?us-ascii?Q?/XKfG2Y8qfEIcGGSFU01o6zWxkySCBrBhyf0b7OxVOX16WeWGajaviUQKB8C?= =?us-ascii?Q?6IqcFuRr3mtdVoRX9Oafsksg3QkbdH2/I6tWnrijL968v9Gcslb758fx/pRu?= =?us-ascii?Q?8L4qtOFL1+jkS1NDAVSserLcs+RJiHuFBN+OrUtYRAQiaEMu+RgdVurj4GzO?= =?us-ascii?Q?Pt0SRD4+nZRsw/no6SQv1kHRdo5GBtH5rbh7e1ytA/g6kwsr+qB7XfyTcrW7?= =?us-ascii?Q?CAONUP8lZQG9lYkCujQT7bYXgYg/uwQx1NW/bpIWJP6Tz9RXyRRgU3QiSHUq?= =?us-ascii?Q?DfU3DL5EwHAnKIqh95h/v5EQWHbdzXC06Y7XxIOD3BiJunwkyNoUt0rsWias?= =?us-ascii?Q?5m+u0GP27JJFP1dc+aTGYWhMp7AKN5EUZmFHlR4OrkUJjJjk+3fhQmKmLHKw?= =?us-ascii?Q?I0irO7usm7JmtamuJFwT1CZ38fmPc10gWslHDNPP4E7WUi7S9V1BYIMGqZeL?= =?us-ascii?Q?WBSTbI5oaen9Wpx+6DPutTccE84fQHo3SiZh9sLfliiWl3lOtuqMlVCJiKtC?= =?us-ascii?Q?+PB4wVOoxaUDuz7VYn5bNjH8+Ll36AkG3Cj9LQRnlk/riXaCrElx+nGZkH9Z?= =?us-ascii?Q?3k4gRbV5AQKzS+om2OrrqylEJstBIR3YHd2HHFkafLkg8omFn77RAdr7772k?= =?us-ascii?Q?9ijJN0ZUKmDEcdtQCbbEDUQSXTeQM75k2cQSWc1/q+TjpIKZnten2pwuof98?= =?us-ascii?Q?YElqyUABXm1TxOefYZ4bW0mUBSeevIXBfeToiHLJh/X0MRzfmdRArD5i/f3+?= =?us-ascii?Q?OpkmXy4oa55t3N5MQyJLsh9288ZfxrDy0UjsPoSLmMC7sd8QHTg9iX6dIF1J?= =?us-ascii?Q?L3ZEe6RUcGqBnPgIrURX6TCtXeaARS1N5GrefcX+MxE6sWrsic6vUF+a67i3?= =?us-ascii?Q?oNDdffeueBgYhmy6iBcxNxhZ?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3753.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 23c7ce82-a894-4e05-c8dd-08d915daf448 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2021 06:47:19.4070 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 1Xfvhc6mRuIdvHrXd6uexJI9SMpu4amb0hvB9fxQ6S4X3jUUOVcF+oxHPR+ywOXuoNDA9pf5dbet8h+U4RqE4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0268 Subject: Re: [dpdk-dev] [PATCH v2 2/2] net/mlx5: fix mem leak when a device configured repeatedly 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 Sender: "dev" > -----Original Message----- > From: wangyunjian > Sent: Thursday, May 13, 2021 6:40 > To: dev@dpdk.org > Cc: Matan Azrad ; Shahaf Shuler > ; Slava Ovsiienko ; > dingxiaoxiong@huawei.com; Yunjian Wang ; > stable@dpdk.org > Subject: [dpdk-dev] [PATCH v2 2/2] net/mlx5: fix mem leak when a device > configured repeatedly >=20 > From: Yunjian Wang >=20 > Currently, configuring a mlx device, it will allocate its own process pri= vate in > mlx5_proc_priv_init() and only frees it when closing the device. This wil= l lead > to a memory leak, when a device is configured repeatedly. >=20 > For example: > for(...) > do > rte_eth_dev_configure > rte_eth_rx_queue_setup > rte_eth_tx_queue_setup > rte_eth_dev_start > rte_eth_dev_stop > done >=20 > Fixes: 120dc4a7dcd3 ("net/mlx5: remove device register remap") > Cc: stable@dpdk.org >=20 > Signed-off-by: Yunjian Wang Acked-by: Viacheslav Ovsiienko