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 1F56E455B6; Sun, 7 Jul 2024 12:26:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 772144067E; Sun, 7 Jul 2024 12:26:02 +0200 (CEST) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2042.outbound.protection.outlook.com [40.107.212.42]) by mails.dpdk.org (Postfix) with ESMTP id 52F9340671; Sun, 7 Jul 2024 12:26:00 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Haa6JBhrRFepIuTe+0nQNd6e56lrcqkZOOpSKi5acvIcYftexEEvUMUSLbFkTOUNxENOtLHsjvjD2stZQUZyl08lDvEjS+ZnIe3uHv1Jm7sWgNZUSHLkFwkB87xkWK6f2dFSdAK1QV2OPep6f/vZPMWqCO1co6KN8XJRc/Nul80+Rqk3YuvAQ5KOydWsLlm6zjghIR5oFtrdi40wpGNystarhiMtZ3DsXeDYP/q2y4l244sBw8wUJ/o/5IeNTlPwwNo81pqevt62WYCuJ0JLK/lrA6x6nRAJo2vUv9ANp4J/biR1/oUXYnmuVKWekE8W9BK0vVaYWNoE7aTJupdiZA== 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=SwhS402HPgG9kpIi+nPg8pOnwp4gVTTV8zsnRTnug8SPbnBYel54fm81qxWMQI/QunMNy1fZJrUCmgOW/S4aOBUL2QGgaWTDgZOCOGxYkRThGFgM0j6xJp5pY73CY2ZjRjTlboXa5gZhNedHdAc3YQrTrzJcHbM7BfzHZsiIPnEK4oMyJ/Rcut67b26j9AT/Z7pphs3mr6prft32EV0QvnK0RPSvmy4LhPChnxUhUoD+IxzgthBJIfKLohQ8fUXbHxFZBIDg5cBYYmV/KDSbPQTFEVXJf4NQLJWMMiCfs/HAYBzpTeijeZXLGJpWtyo8T3fG68bebCai7j5HShsFsg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) 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=EDgSXz7I0nmsEVCKr4A/Qzpwk7nPympDHHJFojLkJPRBDDqMGPEI5PY42OfXIoETX3vTVjHtBRIcb3KtV3QCsMJ0LxZIyTooOyWYF3mcBhyJYFEqXORb9mutz2u0HNM/yR4L4GRWIu96lZGzYmbxDjfOWmtOJOqo1l7+4NnH7L4sI/zhw41kk0kvTe1YIZjVo6EPYMRHc2pTDcr3vouUBXqAw7lLX8fJtirBLBfD3lcmB1Vu91fdVKC9U4n2WAHsfBLHjW5mLQAro3WT4zByE386G7/BZnKzep5+DzgPa8mVNNwpcjCA41SR6GldtM9O1VCvYd1sxaiOmbCsnXfCgg== Received: from MN2PR05CA0001.namprd05.prod.outlook.com (2603:10b6:208:c0::14) by CY5PR12MB6479.namprd12.prod.outlook.com (2603:10b6:930:34::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.35; Sun, 7 Jul 2024 10:25:56 +0000 Received: from BL6PEPF0001AB52.namprd02.prod.outlook.com (2603:10b6:208:c0:cafe::9f) by MN2PR05CA0001.outlook.office365.com (2603:10b6:208:c0::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.15 via Frontend Transport; Sun, 7 Jul 2024 10:25:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) 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.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) 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; Sun, 7 Jul 2024 10:25:55 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 7 Jul 2024 03:25:55 -0700 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 7 Jul 2024 03:25:54 -0700 Received: from nvidia.com (10.127.8.12) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4 via Frontend Transport; Sun, 7 Jul 2024 03:25:51 -0700 From: Itamar Gozlan To: , , , , , , , , Dariusz Sosnowski , Bing Zhao , Ori Kam , Matan Azrad CC: , Subject: [PATCH 04/10] net/mlx5/hws: fix memory leak in modify header free Date: Sun, 7 Jul 2024 13:25:25 +0300 Message-ID: <20240707102532.2045942-4-igozlan@nvidia.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240707102532.2045942-1-igozlan@nvidia.com> References: <20240707102532.2045942-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_|CY5PR12MB6479:EE_ X-MS-Office365-Filtering-Correlation-Id: 00ed22dd-beb5-4329-c00b-08dc9e6f2fc2 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|82310400026|376014|1800799024|36860700013|921020; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?wR5nQH55bLEss160cOmtT0JU9EtjR2tpWtC444ow7YkJJfxbUO7FywEYfCqC?= =?us-ascii?Q?4bNW+hEBoY1nO6IiFzdmeL9HG2VEhkhruxhlMeoouEjfvF8iAODuZS+CvUaF?= =?us-ascii?Q?K9XT3dYu04qwK3V7TX7cmZ93J8pzE5BgeHkjgnOP3kuIE5x+Fac2r+rdNQgi?= =?us-ascii?Q?bQWOmA4bBTBUeui7aQ+sosk3swBEnrZhQg49s4wsO5EmjVp4UVAh02V69edn?= =?us-ascii?Q?1E4TRWcpu+X4ONeNbYwt2AA5FlVKoiL6N2XmIXCewOe6h6iKEDM8P4z4bLdC?= =?us-ascii?Q?I7D41RalfNU22GGP03SOtYZ56PD6YdmVqntmOE9ssCVwYuEKJe1K4EJPjo33?= =?us-ascii?Q?Lt1Co/1zm8mVWJrNDI0UtiGl3T/DFw4YijBwQ6ksoNxNZT3qztR0eNPiwZBY?= =?us-ascii?Q?+iOrw/LimKpxUCcKjcOOZYGD39oWAPjjlnLeDJ1lxx5h6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LXWwRqxoK8/WWsyErheM+YJSbqGLNi/Rhwyu4WohzDfoCsg?= =?us-ascii?Q?1w5d2yODHzjAWPXqtulUhisAAAsfHVhBZ1K+2MQZCXA1wGWQg/Nll3pgTUSy?= =?us-ascii?Q?a1aaN+rvnOXX41UBa32Lmw5xOvv4qaQ/quy8KV0i84nJ0DTz/Ph2SA=3D=3D?= X-Forefront-Antispam-Report: CIP:216.228.118.232; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge1.nvidia.com; CAT:NONE; SFS:(13230040)(82310400026)(376014)(1800799024)(36860700013)(921020); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2024 10:25:55.7743 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 00ed22dd-beb5-4329-c00b-08dc9e6f2fc2 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.232]; 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: CY5PR12MB6479 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