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 B58C5A00C3 for ; Sun, 31 Jul 2022 09:02:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D8734014F; Sun, 31 Jul 2022 09:02:30 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2088.outbound.protection.outlook.com [40.107.243.88]) by mails.dpdk.org (Postfix) with ESMTP id E3DA740042; Sun, 31 Jul 2022 09:02:28 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q1qsdmpdO1/Or8+K6RGZuGM/hRdxxlSrsVxjpkFXuvhWgy53Beqws8TXTch5fwRul5n+zlu7hlAvGzmi/7nv22ns+2OuJoJqY/Vnmp056fwf/yltmmwxLfLvUuHu1w+SRDRui1Fg4TSzYxPYwY70Tjeu7XHlg4cwKlt2wZQYvmDCirlwRV8Flk4ezr9JgeY6mlVez4XGMheYIKFNShelyYSpyzrWtuYG28RMYoBYbB+1OAo+OpNK7KOc7IW1BTKo0zTLJzUJ3IY6C33Q5ybCtDSkS0PlJWRYe2fLiKkQnWUr8O8RLTjVm4k+51v/v4og/AuZtFp5GMN7FMJXOSt9pQ== 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=YmCa5ZYF9bNCgMYg961vyISISTG+3BNu/jRDZarSuT0=; b=gzCiBIljjGS+GHAZ3EjY/nwfBqty5eMD9dcxON+tu65iTECDXT8Q3c3XK/zafURK0LSlnHHHZ/Eke7iNxDKPjlxdHDCONdNJEDEyewbwU9KLr5nGgk3vYOs1io01t7qHbhGxbf8YMFdFAfQPpcIoe1sXEqFtK4oLDjdk5ZXiDo7t/PBOwL9TaztVe26nAuUapMqGLTMa2cN8CL+/Bw57RZYCr4PWoIvsMKR7X9zPeyPn+j3F2uhK9m0Li6iu8rF8DI+8DrmCNJ9ZAqWzuzSDgTBRSIJFu4oDMIEAzDtrZsUe6o9M2sKsDAckR8mb2XXfMtn6icXcPp0fddX2Qm7uzA== 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=YmCa5ZYF9bNCgMYg961vyISISTG+3BNu/jRDZarSuT0=; b=hLQEKyCeJC/puPloduZ8DtC54/HbA86GBt0pC6J97+AkeQgG4e0bED/MO7ULLjDknUhNNoAcWg8TFsKmOrOlu31LfbtRIIHaI8Y2vCuIjmJ8tKdCNM4pd2ZjunXcssC1LLARWxPgV6DNbXBsb8Q2K3cmghTRnJV+Y1G5xepYzUVgoD35VOa8LvE1iQoH0fBuiCjfWVT0T7XVLImCwOMZVqnYZO2nyyBTZ+m4tBRahETSBvj2AnZ+BUn4aPrgKzdSW/Qfs2Yeaq2WwwkLeZQ3v9KJFxJ2ZJk5llE6Y9BaQr9DJ6oVHx9ThrC0RvDNkPHuJGqpK7CsgKgvkDdW54owrw== Received: from DM4PR12MB5389.namprd12.prod.outlook.com (2603:10b6:5:39e::8) by DM6PR12MB5568.namprd12.prod.outlook.com (2603:10b6:5:20c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.11; Sun, 31 Jul 2022 07:02:27 +0000 Received: from DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::bc12:9556:e6af:a1d7]) by DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::bc12:9556:e6af:a1d7%6]) with mapi id 15.20.5482.015; Sun, 31 Jul 2022 07:02:27 +0000 From: Matan Azrad To: Yunjian Wang , "dev@dpdk.org" CC: Slava Ovsiienko , Dmitry Kozlyuk , "huangshaozhang@huawei.com" , "stable@dpdk.org" Subject: RE: [dpdk-dev] [PATCH 1/1] net/mlx5: fix memory leak when releasing a drop action Thread-Topic: [dpdk-dev] [PATCH 1/1] net/mlx5: fix memory leak when releasing a drop action Thread-Index: AQHYpADpNXiS30CPWkqPmw/MpvNNSK2YDdXQ Date: Sun, 31 Jul 2022 07:02:27 +0000 Message-ID: References: <004c86e8ddf05bb9d3df77580357c4eca852c013.1659177063.git.wangyunjian@huawei.com> In-Reply-To: <004c86e8ddf05bb9d3df77580357c4eca852c013.1659177063.git.wangyunjian@huawei.com> 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=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6c4c99b1-95e7-458d-2f87-08da72c2a0c6 x-ms-traffictypediagnostic: DM6PR12MB5568:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: BVOyc8A6z+NAILyRLu1VJPsuKowl3f37LFk2ehQp0yrNEFCUJPPl+gnZVHaQi3b/K94opWYVIzvdb6PYUjfm9C377S3LsWtvVN8zH38f/x2pVdTGhRu4Gy/YHsNYd0e1hZVAnZLyqkqmRTiv/gGmu/c1eVQI1gp/AejDyfMurQTU0MggNIg1CxADgXtYXuR6itETqS2MrR2TK9xzkOMy9Sk6Mi0VSzyHrkkwGOYpF4nDmaU7a034yhAEH+FMHlWgvLsn5FeIX72BIyMCpejWDdAtyVFKPlfZTaGhbthGUs/f1ARRDqW479eJLlFQPCTxNObhp+LA+tje/F1N/1pYlNozkAcjAzfWvbqB97UQ3SthnAxsusquiZco5RxWT23tz5rXxb1cmJQos6LyaUYai9WtCiNZvAQXQUNhGjrTnSN0yw0YHnHgqTM62PD4ZQM+Q4lDqqpSAanFjP/1SFdgV3FufPXvNfMhAO680JFH5kuAbtrrAqBZOVjNM3i5VK/3m8v2nOuR7RJfnpLLoN8Ksu7ljvZUxwucv6xp5tusdyY4DmwauD5ZEEn9KUlZxEt+yCQCU3d7pb3gkUjWAu/vwkFq17/SW+yPDqua7gJu/1W8DMdk5vTAaPj/WW/XLaVfw/Mx3o4Fls5KbuQ2TjrsT64apVlYZolo74Hi5csoOLL/6HwMvC93k7wgyLWz0wNnTGj1AT5dM7QTaSLFzTlIKmF/AU3+3IAgiJEfFwaxM6SEYHVjcO0+gABTRS69T1X8mH1FrlgZAMgi1w6ttyp1INnC7LbWLeK20b7gWiPpsP0= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5389.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(136003)(366004)(346002)(39860400002)(376002)(396003)(38100700002)(38070700005)(316002)(122000001)(186003)(52536014)(26005)(33656002)(8936002)(478600001)(5660300002)(76116006)(8676002)(7696005)(71200400001)(4326008)(110136005)(66946007)(66556008)(66446008)(64756008)(6506007)(54906003)(55016003)(9686003)(41300700001)(86362001)(66476007)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?NIj5xZskFQ1L7ZhVVB8iu1G+FF5J/FAvZZj+53JGnSidfX2c9jZ2EGS418KJ?= =?us-ascii?Q?M9TdrztO1QtlVbT9HKBmkRHEt/el0gQVN/CuGXUczHgDow1niMfYoXg9LnWh?= =?us-ascii?Q?0JrwYQgqKpoRnJWAQeDGKJJlVpzY+/OV8bUNUtHZwp+CFJRl0aPmSpC8ZLef?=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hWnVzllamfHFMs0/gScfZZO2I73Mt/zn?= =?us-ascii?Q?3OclMWcMWUFLVtR5KkJz4+lDevrhbQlbfm9QyUOm0YK6Tu+xSGVXFXV4U6hJ?= =?us-ascii?Q?qBc//8QdpmyeeCLnfCGIKAQwxloN6t/cboTJWTaNwoQgYzbtGFPLvbNQIXI3?= =?us-ascii?Q?NDIvCRAnkNOhbzAcMODFaIcQWSckeK3UJlwYyHS9AeaWRRcXNg6gXwVcFvNU?= =?us-ascii?Q?Dhy4En4CUOovw2gl2BlmUG6YMzhWIO0N5EJI4eUfdb/esRtgXjfG7l0wcXqF?= =?us-ascii?Q?JiQ8qPQvTFFPwt5upHMOGeypsni4IgLWc+GKm2Bl9a+4E9hFt5rqIwE5vUig?= =?us-ascii?Q?9vM1l6fXWEYCYC2mxvlH5Snioz657NNx9Vr61Vat3zNYC6G2/w7oQx896Gkr?= =?us-ascii?Q?hUlUMxMSBBELm+rtrgdAsfwJqae+zsr/kV0lWegHsXJygZ9g1w4cIEgqgCrY?= =?us-ascii?Q?E8bTLlCU0GQAX5q+kd+W+mtjq7/iBCJiaekJwbo/MNEDbOXXGdqRBK+5UiAQ?= =?us-ascii?Q?8xEriIfPtgSBgnr69rw=3D?= 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: DM4PR12MB5389.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6c4c99b1-95e7-458d-2f87-08da72c2a0c6 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jul 2022 07:02:27.2273 (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: b8uZyLAcLb0dSXb7SR1EWBDGe/vCdiPsDGyszPOxl6ADJxoeYqzovHPVGaowoQwienfM0oBTvuF6US3TB6O3Wg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB5568 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 Hi Yunjian From: Yunjian Wang > When the memory for hrxq->action is allocated in mlx5_devx_hrxq_new(). Memory -> resources .. are > But it was not being freed when the drop action was released in > mlx5_devx_drop_action_destroy(). These cause a memory leak. >=20 > Fixes: bc5bee028ebc ("net/mlx5: create drop queue using DevX") > Cc: stable@dpdk.org >=20 > Signed-off-by: Yunjian Wang > --- > drivers/net/mlx5/mlx5_devx.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c > index 6886ae1f22..171ce5c08a 100644 > --- a/drivers/net/mlx5/mlx5_devx.c > +++ b/drivers/net/mlx5/mlx5_devx.c > @@ -1097,6 +1097,12 @@ mlx5_devx_drop_action_destroy(struct > rte_eth_dev *dev) > mlx5_devx_ind_table_destroy(hrxq->ind_table); > if (priv->drop_queue.rxq->devx_rq.rq !=3D NULL) > mlx5_rxq_devx_obj_drop_release(dev); > +#ifdef HAVE_IBV_FLOW_DV_SUPPORT > + if (hrxq->action !=3D NULL) { > + mlx5_glue->destroy_flow_action(hrxq->action); > + hrxq->action =3D NULL; > + } > +#endif Good catch for the leak. I think the issue is in mlx5_devx_tir_destroy and not related only to the d= rop queue management. So the fix should be for the mlx5_devx_tir_destroy. What do you think? > } >=20 > /** > -- > 2.27.0