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 4298E455E3; Tue, 9 Jul 2024 14:32:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D4954270A; Tue, 9 Jul 2024 14:32:01 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2081.outbound.protection.outlook.com [40.107.93.81]) by mails.dpdk.org (Postfix) with ESMTP id 9E79F40ED3; Tue, 9 Jul 2024 14:31:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ivvKHGTuACjf8yVjvxEWZZA5jxzcBGMXNKbfttSLfka+ykaTcR+vncBohU8v7fCqe8hhPhVVgOxY9WFmZLfua9Mb2wr7/t6El2Mh0PEC3bVMNWuLuWysC7OczH/8QxfVpocwROXEUQKbf3Y1C0Jffl9ICXtV8XCXjNJojHGckXcaKBT2uJH/dbeUvbVSeTQDo+R8sefXLX71sn+SizJxyB2XLDHibkbP/C6mpCUyjjSTV6WrwHur1mKbbh6sWLIczIokn3bptIuLS8HSlFEQiQNafsKhg67PnRLQbxE7R2OvIzmJgW2b4bTm9O9j799tW88Me1n8PiJadn+9eu7lbw== 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=mQPMxZetFHL4jAQX41f2xDbeaeuHp7OBURe3PIcZ1Vo=; b=grA8wBfC5qWhfgQujHzTi3rrStUWWTE3vBzSmbq38oLFshQWwON2jQTuz4fPuqid1UnSJscMTgVnu80LlPGbXll+y2qBDdKH2w2HATUL2e/puDMY13ZS7pRG+DkV+lnVf86vZzvZLXXMkPYLmURSWJ5qy4db2ALxoLZ84cpzzZKC8PLx9JOYLke/BlxOjhjC8dFEm2ztsgAJLMEOIDwJmIKup8xlJ2qz41xDRo2ADM6g7Uma5aDclEshAL91L3asPCf12OpgGYAvQvX0j2BRS2pLvqu3GTMCxvduAXU4o8pe/Bgs5KoFnT0mvjHgYZW8aOCNpNj2kxBGn7KiHieZhQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=monjalon.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) 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=mQPMxZetFHL4jAQX41f2xDbeaeuHp7OBURe3PIcZ1Vo=; b=AJ7Bae67fA9sTX2U6EdpnbZ2sHJBrAr12Lp8KWtMPn09KquYJweryPn2w9Hvf/nCfnB3sK7Efbow3C0fOvvdVs3OiRRt3VgU5E9ISDaOzcj4nLfA3bgWypI1qnzrO+7qxLH3CyCKX7N6rhiMB/RFr+UX52VrGizPQJK3UseJ2TeSet6jZR/zvUfvWAcvryTSmOvj9cQDNc3RoXZzsBrYxuZmXtE8pPfcOwHpHk7SzjeYsHQ5GMAuCs3Hkjm4Mfjha//OVvxLsQp8xnjulrt/ZPnlxITMFlD8/r0idmVmO0KbQR99TL3m+Rbccwlm2x2MGMHfNS06rPHpmRyvLGZTOg== Received: from BL1P221CA0018.NAMP221.PROD.OUTLOOK.COM (2603:10b6:208:2c5::30) by IA1PR12MB6068.namprd12.prod.outlook.com (2603:10b6:208:3ec::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.35; Tue, 9 Jul 2024 12:31:56 +0000 Received: from BL6PEPF0001AB52.namprd02.prod.outlook.com (2603:10b6:208:2c5:cafe::38) by BL1P221CA0018.outlook.office365.com (2603:10b6:208:2c5::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.36 via Frontend Transport; Tue, 9 Jul 2024 12:31:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL6PEPF0001AB52.mail.protection.outlook.com (10.167.241.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.17 via Frontend Transport; Tue, 9 Jul 2024 12:31:56 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 9 Jul 2024 05:31:20 -0700 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 9 Jul 2024 05:31:20 -0700 Received: from nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4 via Frontend Transport; Tue, 9 Jul 2024 05:31:16 -0700 From: Itamar Gozlan To: , , , , , , , , Dariusz Sosnowski , Bing Zhao , Ori Kam , Matan Azrad CC: , Subject: [PATCH 2/8] net/mlx5/hws: fix memory leak in modify header free Date: Tue, 9 Jul 2024 15:30:57 +0300 Message-ID: <20240709123103.2101902-3-igozlan@nvidia.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240709123103.2101902-1-igozlan@nvidia.com> References: <20240707102532.2045942-10-igozlan@nvidia.com> <20240709123103.2101902-1-igozlan@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB52:EE_|IA1PR12MB6068:EE_ X-MS-Office365-Filtering-Correlation-Id: 8f89e6f6-cd62-4907-04e7-08dca0131eea X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|36860700013|82310400026|921020; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?IA5gtfgKddPaFJQUu/s+YPEBZXzGr60xp2OsjoTlRgMcdcMLy6i5KCA+wtku?= =?us-ascii?Q?bMzD77wjTobgD4kSR5VCoaNMevUFdUwO3BsrXzPtI08I6Jhn19I3WDb0nLM1?= =?us-ascii?Q?nUKlZLNh7LuW3JdHs75auAEX7zGjc5/vkKbhMrsYmE6Lyw2Cp1/PClmPmbJY?= =?us-ascii?Q?X5VNxnxbotTEWJEZg11d/dggjeugUAY6e/PpoypdzSC0Aqr0YuFjp7a9+ILl?= =?us-ascii?Q?VGCKWApJnWLz9ZHO6H8RoUfG23BV1kLk8JdwxJI/1uiFhCYkam8APJmxyLLT?= =?us-ascii?Q?m3vZ/Mz/yWGEBYpSjRiAsoik43lzBvwnARzK6Gr4zOjcuOq7R+cJS+Aw3c7I?= =?us-ascii?Q?EMMmrZqHOiIACBmu59kNzGK7r5VF/rFRjyvj3A6f6/Li46bhxwHXK1mvst3a?= =?us-ascii?Q?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hZhC6KUOgP27VKIqKb0wBb?= =?us-ascii?Q?v3aXf7iZ/yk9oYCo7Kqu8HrGWNdsE114jeCgxbMfKxppXlFBomT5SQhb7ngr?= =?us-ascii?Q?NMkEzK1Akf5q3EJPMS0IANBcxP7MOXoGBRXJ750aLGNlQbsYi2bdEkoJE/GT?= =?us-ascii?Q?vN5FtOkhHFwye0Haam4XdC1uTV8XRbi4Tu2By8MxbFTPaAGOaRDErA=3D=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(376014)(1800799024)(36860700013)(82310400026)(921020); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2024 12:31:56.1212 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8f89e6f6-cd62-4907-04e7-08dca0131eea X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB52.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6068 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 From: Erez Shitrit When creating action from type MLX5DR_ACTION_TYP_REFORMAT_TNL_L3_TO_L2 we use modify-header object, we support few of that type at the same time over this action depends on the number of headers. Now when destroying the modify-header object we run over the number_of_patterns, this variable was not set in the creation of that action. Fixes: 3a6c50215c07 ("net/mlx5/hws: support multi-pattern") Cc: valex@nvidia.com Cc: stable@dpdk.org Signed-off-by: Erez Shitrit Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_action.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c index 03c3683f71..b90f18df8a 100644 --- a/drivers/net/mlx5/hws/mlx5dr_action.c +++ b/drivers/net/mlx5/hws/mlx5dr_action.c @@ -1820,6 +1820,7 @@ mlx5dr_action_handle_tunnel_l3_to_l2(struct mlx5dr_action *action, action[i].modify_header.max_num_of_actions = num_of_actions; action[i].modify_header.num_of_actions = num_of_actions; + action[i].modify_header.num_of_patterns = num_of_hdrs; action[i].modify_header.arg_obj = arg_obj; action[i].modify_header.pat_obj = pat_obj; action[i].modify_header.require_reparse = -- 2.39.3