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 9B2B3A0C3F for ; Sat, 12 Jun 2021 01:20:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 957DC4003F; Sat, 12 Jun 2021 01:20:20 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2069.outbound.protection.outlook.com [40.107.223.69]) by mails.dpdk.org (Postfix) with ESMTP id A5100410FD for ; Sat, 12 Jun 2021 01:20:19 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dzcBJhfJapXcFBtsCnt0lQhhh9GSmpnM3zruJYLXnqQ2AyxTTFMTBulMPqqzWpy4DBNJI/JXdp/pCcxHFDEHjeeFQk3mZAPEe1M0biE3A0RKM23ie4RzczzjOwcwOt6Z0eJ+xUMh8w2zsbJbliX+nI+T5xf1maz9mo9KCzy/BIqvu+ILdtf3IohRBwdZDhzoTMQGrma31hFNp72JZ+Eqx6X4PcqpdaF+ZmuiBkl4PlOE1mkfRtnDAo130rGyGbmXicT6tpsRMm8tX3fgYVBZX/pqvvMsRPP020zgdRp+OiViwXXVT9f8URL39pjiS1SPnMyyl5JeUzGbTEDVt8uV2g== 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=Sgp7QFh+JqG4FpT6RLNo9QDedCMSwsD2u4sRv/NVKzA=; b=gcNMpbPtmr8qggC9ALW9SbXeJTJlKGbjnC52TubVMFgaLo3GZK2gVmVxRQmF1BMD0nYncurRjKZg6Nxypv1pkV487QGppV8/4Loyj8vBVHsfMAiezPRbOs8274w+JHXNM91QoYEh6UvV3gE7vgUcT4yG3ULc3ib4kn5hX9q1bqr7WCLtyxGH4l1ydQj5ucTXsvvYfGvdA0mApl6ikqu6z56S5WdG2rgoy6ozGfvTgt3MwsLnIQHF7ZeB9tI57kQCkgWLAY1L3uD0ZQubM5geLEUYNvhAeaMUsYfsmmzXr9v10kTJwegFiI3MFFBwNOyJIyxfEIBT8hxbItuZVzIVfw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); 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=Sgp7QFh+JqG4FpT6RLNo9QDedCMSwsD2u4sRv/NVKzA=; b=XyGG+UIwln8N+G90TTV+SbVZeZWKtz9rvaXL9lzo0AID+XrNYtdysZhDBjDN1a2PJAp2zze/ienUkkSJwCMyRsYbVaWUgm44GSmmqyIFz7gHnpKgmCI/ZHX1x2b0vTnz3JsTLdaQykgf8Wj1dfLtJlqMiipaCKTwoCXgo8ThPZa6sHkTUiExq7cK6/Mo77JJl22sRkUX3w2hxhcXy3ACpNnfWipfLYaGUMVRhW5ro8aj02XbN1vwi1d7eqih5WeveUBjze92IiPRhpHi+uWT8NHpfZfvaFpRbBT/vnXn8zMkDx9JUSbnRcVUDm1UzJ1EYwc1cK5gE5bpGkK9xPhjXQ== Received: from DM6PR07CA0058.namprd07.prod.outlook.com (2603:10b6:5:74::35) by MN2PR12MB3503.namprd12.prod.outlook.com (2603:10b6:208:cf::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.24; Fri, 11 Jun 2021 23:20:18 +0000 Received: from DM6NAM11FT027.eop-nam11.prod.protection.outlook.com (2603:10b6:5:74:cafe::33) by DM6PR07CA0058.outlook.office365.com (2603:10b6:5:74::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Fri, 11 Jun 2021 23:20:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT027.mail.protection.outlook.com (10.13.172.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4219.21 via Frontend Transport; Fri, 11 Jun 2021 23:20:18 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 11 Jun 2021 23:20:15 +0000 From: Xueming Li To: Yunjian Wang CC: Luca Boccassi , Viacheslav Ovsiienko , dpdk stable Date: Sat, 12 Jun 2021 07:04:17 +0800 Message-ID: <20210611230433.8208-163-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210611230433.8208-1-xuemingl@nvidia.com> References: <20210510160258.30982-229-xuemingl@nvidia.com> <20210611230433.8208-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5b5dd682-1c2d-4944-0ab0-08d92d2f79e7 X-MS-TrafficTypeDiagnostic: MN2PR12MB3503: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BcqoRMOtS7E4LEbXjnQ3Nchv1uu12o83vFaAbe2C3UjLDm7kr56ES6ta9BwyNAmyvNWiQHlgcI2c3N/upMDo4q2il8t/ROYrpRzShWj9s0MY5SAEahzTXjSMcit25K7iY9G5tO5uByqP76bL7MZG82npwrrgqYoWrTaVhNifVn5QQ75wXz20RdW/8Ox+VMxzX7NLJ05kEMy4Tinh0TXaZO9N4pJnd3UjnhIPdBqcU0nMpFUdzdrADRQCxhLGtPSK98qwFJjs924UJV5kvs6X8fuQv44Ih8WE4WGTVCi3c73mtSoeGb5EAEOwGYdxom8hecGkHkSVDf/NY67Ky9ZeIBNMIG4vFMk/cIzVCdJGuuZuijYjkcjNaG56+q4irguNRAkdhjBYQuiz9Z295g+EfBJ0QIJ3+99XFeoxoUOXeHzpXQATdxFpJwhnAvcOQUDIxdnxGolddS1u+WmWwRUHM9yjLFI8OvYLv18yXN8rD6Uvsx8Ji/gsHK8OPEIw/6nRKzPEqU+1o7av/mOcpzUOLfrCZsdZMyXX62FjmtLKpkemUcOvTrzu4RGOZKCziye4XAuuRNtHE1GVhNuEZahw7meS+s/AYJoePVIjmMNisZ+gK7nP3GbVudI+rs37o7ueC6QtP3k+GbIkeUUCFK77rbNrM0NaDLOZZ1kpxNBPBiS3TwZaP+ylHDARJN+ksJisdvedQoinEjNc92Pk6OWkWKlHoRrGFbLybnZLEyJkoaybBM7+T2Nh+YwyklcAkEwABJPoB8sHI4krcTnPe6/7KgsiDVz1Krnb6OLQEc5DNZ50gy5H9Gro57EowRGjda54 X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(39860400002)(346002)(376002)(396003)(136003)(36840700001)(46966006)(2616005)(336012)(82740400003)(36756003)(70586007)(5660300002)(426003)(55016002)(4326008)(2906002)(70206006)(478600001)(966005)(82310400003)(26005)(16526019)(186003)(356005)(316002)(8936002)(8676002)(36860700001)(54906003)(7696005)(6916009)(53546011)(6286002)(36906005)(1076003)(86362001)(47076005)(7636003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2021 23:20:18.0403 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5b5dd682-1c2d-4944-0ab0-08d92d2f79e7 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3503 Subject: [dpdk-stable] patch 'net/mlx5: fix leak when configured repeatedly' has been queued to stable release 20.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/14/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/570fa795f0894854a37a6cfbfa7d0e1b06ab1736 Thanks. Xueming Li --- >From 570fa795f0894854a37a6cfbfa7d0e1b06ab1736 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Thu, 13 May 2021 11:39:54 +0800 Subject: [PATCH] net/mlx5: fix leak when configured repeatedly Cc: Luca Boccassi [ upstream commit 6dad8b3a381911c6f7fe0362517bee9bfc24def3 ] Currently, configuring a mlx device, it will allocate its own process private in mlx5_proc_priv_init() and only frees it when closing the device. This will lead to a memory leak, when a device is configured repeatedly. 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 Fixes: 120dc4a7dcd3 ("net/mlx5: remove device register remap") Signed-off-by: Yunjian Wang Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index f5c1c800fc..7953a27834 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -1243,6 +1243,7 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev) struct mlx5_proc_priv *ppriv; size_t ppriv_size; + mlx5_proc_priv_uninit(dev); /* * UAR register table follows the process private structure. BlueFlame * registers for Tx queues are stored in the table. -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-06-12 06:54:00.676516700 +0800 +++ 0163-net-mlx5-fix-leak-when-configured-repeatedly.patch 2021-06-12 06:53:56.640000000 +0800 @@ -1 +1 @@ -From 6dad8b3a381911c6f7fe0362517bee9bfc24def3 Mon Sep 17 00:00:00 2001 +From 570fa795f0894854a37a6cfbfa7d0e1b06ab1736 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 6dad8b3a381911c6f7fe0362517bee9bfc24def3 ] @@ -22 +24,0 @@ -Cc: stable@dpdk.org @@ -31 +33 @@ -index 35f91e965e..cf1815cb74 100644 +index f5c1c800fc..7953a27834 100644 @@ -34 +36 @@ -@@ -1455,6 +1455,7 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev) +@@ -1243,6 +1243,7 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev)