From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8DED4A09D2; Wed, 11 Nov 2020 08:37:48 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 37BEB567C; Wed, 11 Nov 2020 08:37:30 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id CA3B04C90 for ; Wed, 11 Nov 2020 08:37:28 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from michaelba@nvidia.com) with SMTP; 11 Nov 2020 09:37:23 +0200 Received: from nvidia.com (pegasus07.mtr.labs.mlnx [10.210.16.112]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0AB7b2wn028356; Wed, 11 Nov 2020 09:37:23 +0200 From: Michael Baum To: dev@dpdk.org Cc: Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko Date: Wed, 11 Nov 2020 07:36:46 +0000 Message-Id: <1605080208-12165-3-git-send-email-michaelba@nvidia.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1605080208-12165-1-git-send-email-michaelba@nvidia.com> References: <1605080208-12165-1-git-send-email-michaelba@nvidia.com> Subject: [dpdk-dev] [PATCH 3/5] net/mlx5: fix ASO age pools resize error flow X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" In ASO age pools resize, the PMD starts ASO data-path. When starting ASO data-path is failed, the pools memory was not freed what caused a memory leak. Free it. Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging") Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow_dv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 78c710f..8214c59 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -9347,8 +9347,10 @@ struct mlx5_cache_entry * /* First ASO flow hit allocation - starting ASO data-path. */ int ret = mlx5_aso_queue_start(priv->sh); - if (ret) + if (ret) { + mlx5_free(pools); return ret; + } } mng->n = resize; mng->pools = pools; -- 1.8.3.1