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 D0C26A0A0E; Thu, 13 May 2021 08:46:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 55E064067E; Thu, 13 May 2021 08:46:36 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2050.outbound.protection.outlook.com [40.107.244.50]) by mails.dpdk.org (Postfix) with ESMTP id C77544003F; Thu, 13 May 2021 08:46:34 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VCRnzSLmiZxTBGwno3l/Ad/B++mg7k0CxS8ovopOceN/9ALpmjw9YOGIHA90/xr1DZZq7lioKE4MIj2Xu6l7Y4RSbXivMglPcg9MTl8GMNm2VQKBXYe7F9OYardJt/jeIthGzh5tUH3Vir2ZrCaO1sNJ3YrfbwwdEhxAF1KV6P5OvkceE3tHHa76qz5fq3sHVH3TQqrJBrcy+eA3uLDnW72BaFSiZf61BIvREMdNOgdOqCDUljcqT2ru7uyX/g+KhcHaaxWwTQjE6FjY7i9N9B+19mTfUctxpZoc51IoFoZnwujl1uABlaastHfqMfJqoJVzBdzaoc+/4J/CvLkw+w== 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=02PvBuYO815RaL+0UgPATyAoZOPYYWrS1YvUTaw8dx4=; b=JcUYCIkP5cLBPy4zXl+ZWSKvVNbJqVVkA2L+ajEpfN/U7Xw2U3d+5Dl/6+77wXQMhDPdtbBS8fgMmCUr7rCIncoS8wY8VkQGzjgY/KACulC0GNi2taltf0Mx6SREnUercURJRrLgygnF2HzjcL6UTq5jOSyg9RBuAAwtSiw+WE/xduIU/VyrL9hUP4aG6149hk+iid7/wTQmlRWjBg5qfpWAF9Vwwqio2Gti7gVoYsWYAH3CF4O/8OCyG5c30/HK9bM98O1PwoxFNcf/wsIJRwRp0/7eONWPVUbf/LyppmH+x80AMD9ZCKWbO4a2qef0saRt9fzBWHKPE8Zd3B/Vwg== 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=02PvBuYO815RaL+0UgPATyAoZOPYYWrS1YvUTaw8dx4=; b=T+9SVLCxjd9FjSA7qsZN7W5Tbo+aICF35ROR1X9OoV8V/qF/l4kMybhO5CqS5YSOssINvm8nJ+e4eT3pe5ic9VFLUhfzEOGmCW4UjGnJ2l64MtFIgkTCwAK9gK6GW5vpy5elyOAoI6IQuhH+mVtHIqVyGkXewdAH5MkXUCH071L2DJCf0S0vvJVcq/EXrq2SJ4FdXrtMp7V8dhAXen+twD7Fi2Lr6aajOF6hSawzO+iB/UvaK3VQqCN9ZhqU3XaFl0v57Pv8MICB8J0xV+pEUER0heMooyw5PUkxGbVGOl5EP9EI3YswK52GDna/fyn08hqt+5rU0xYDwMWBW5/f2Q== Received: from DM6PR12MB3753.namprd12.prod.outlook.com (2603:10b6:5:1c7::18) by DM6PR12MB2650.namprd12.prod.outlook.com (2603:10b6:5:4a::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Thu, 13 May 2021 06:46:33 +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:46:33 +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 1/2] net/mlx4: fix mem leak when a device configured repeatedly Thread-Index: AQHXR6mgjdOYLt30okSAcJ/fAc5Dyarg9+Hw Date: Thu, 13 May 2021 06:46:33 +0000 Message-ID: References: <9fe1d9e5dea152997fa7bd9748154ef51755a29b.1620876356.git.wangyunjian@huawei.com> In-Reply-To: <9fe1d9e5dea152997fa7bd9748154ef51755a29b.1620876356.git.wangyunjian@huawei.com> 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: f53e8d40-bbf3-4f21-6384-08d915dad8b8 x-ms-traffictypediagnostic: DM6PR12MB2650: 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: sKcHMFgM6RFH2v6pN4smfUNW06W1x39/OWyk59167z1MGl/fNxF0yYDktZoCCOY3p34aB/s6Nv2QnfqFPDoJrQP9+qHNsV4aMZ5UmsawcLpb78OMYX0S1y5xQPPHv7M6U2CdmNCaacSCsD73xBlSZItGSdVAP8YFdZH10iEAqO2d95PbGDdNeODdSk/GsNzH/BWoSRvqPBAt22GKRsiHCauRNZNe5FEl9vVyrC5gZA9U0SrJ7BqelsdTeKrGDrHa3qkGl1rD+JFJlxwhzNkb3i0PmG5j4OYL8za2gRgTNR4jbtDTUUKDexYTWgbQY4xLKY+pNK89vxpapWfmwjoc9M7Q3ndXZUKj9JaP78M46DR9gcT8WJCeejpJ/gmE+LBwWbBnx8+A4w+q0fleI1mBkHXArV3MllXEt13V1vylojxwPwiaf3gNyYzyP+uQR/DVnj9dXzKBP7orbQdbfkI/QI9M8DutCGfHlu4Ne5vsBS1kTiawtLEknCiNoz53tHFgJbPyRIiByrnhC1AXkQKe5Vgcp8aO8w9lpDbcwSZyj0421Q0SmbEhhXssgM+x/tstqQQB7d+b/nzkDpkCV7LBMTDRP8KDTgXnExrqfxeWNSU= 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)(136003)(376002)(366004)(39860400002)(346002)(396003)(55236004)(478600001)(86362001)(76116006)(186003)(71200400001)(66946007)(110136005)(52536014)(6506007)(5660300002)(66556008)(66446008)(4326008)(33656002)(64756008)(66476007)(26005)(83380400001)(316002)(8936002)(122000001)(38100700002)(7696005)(9686003)(55016002)(2906002)(8676002)(54906003)(4744005)(53546011); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?AZbm+BwDFrP2TYbtzoS3NONBnpIi7bZkrzDpDGBDnNp+agDNGkgSVqbcC9tz?= =?us-ascii?Q?3MI3o6trvR1UsRHXNs8N/WzxtIXqvJa0SdwWlu8INUnstdtXp6TvHNSwuzaO?= =?us-ascii?Q?BfF9OOanWmb8ltCd6mY73IBhOPxmgEk1dQbgLUQbvvbLXXXOuxpkHSxuHW4C?= =?us-ascii?Q?/JVX02h3B9Y12v3KBelnuEFBSXQsE5xY1Vd1ngQHdx7qzk9ZF/BejPETM3D4?= =?us-ascii?Q?tWyg0Jhz7pOdQflDuyCUzua+3WreH37mr1PC5Yzgs4T0F6A6CTr4kmuirc2+?= =?us-ascii?Q?nRZ7j7g4e2Iyl3+A23kGmbHkb65XhyD+Dc8I7hh3QpeQ0WA0bh0YXunXSPwP?= =?us-ascii?Q?OgNbXGw39fckvo7NsArMJl4TjMoONmOvuMPZkzgcD5468pCK0RSXiUzwX0HR?= =?us-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CDmXAOkZNnrH9tBqFAAYs6lu?= =?us-ascii?Q?tUjRWkSyRPzOXJu5RXmsANKH?= 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: f53e8d40-bbf3-4f21-6384-08d915dad8b8 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2021 06:46:33.1223 (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: x7zlaT1qcVqQbmvmQyCShPMJiCiI86jcb9JXMXAvHfAH0FUUdS3BzSUAxWyVAXur9qyJ8tCSawEpLMR16QbeYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2650 Subject: Re: [dpdk-dev] [PATCH v2 1/2] net/mlx4: 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:39 > To: dev@dpdk.org > Cc: Matan Azrad ; Shahaf Shuler > ; Slava Ovsiienko ; > dingxiaoxiong@huawei.com; Yunjian Wang ; > stable@dpdk.org > Subject: [dpdk-dev] [PATCH v2 1/2] net/mlx4: 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: 97d37d2c1f6b ("net/mlx4: remove device register remap") > Cc: stable@dpdk.org >=20 > Signed-off-by: Yunjian Wang Acked-by: Viacheslav Ovsiienko