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 1B4DBA0548; Thu, 2 Jun 2022 13:39:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B189840691; Thu, 2 Jun 2022 13:39:26 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2088.outbound.protection.outlook.com [40.107.237.88]) by mails.dpdk.org (Postfix) with ESMTP id 630BC4021E; Thu, 2 Jun 2022 13:39:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IIVLTsz/A/F8NCoIWmbGTaU6INEnryFKV8SoTTnkN1nKeb2sJwcNbUxRYuZmuj9EHurOjZmwbqoJyIR8q51Lmhd/WWY0EIkBcvbLxYATjy9F1VA2cQsFKEcBv74fCxANQrFwhxLKvfse8m6ebI2lHSTnbMFHIoYuQwe091afoBmosVPvyqyzN4uoiQf+CLITNa91bfFRESrwpl3ANIaw4+ZK1Ix4koaBsBOZof4d2v0t4IA2+fQrF98lKzHPaHgpSvhMMwj9ziU2zsdaY4O3KpAPs4XrcKWAhKeZLpMt+yYe3h4nEP32ah1mwznlC5be2mF8oRGRu/65tu2BhLU1pA== 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=tTn6IeXXd5vg4lSeYQeYXEQ4K+ZJv4Fi4+3Zq+x8K20=; b=bsijURgO5r3LeNSK9zoAazTuva3aF7EjFljh1cOilNaCYqDt+HZ444nrkIrLPyQvEpyW1xyfIAXfmQsrCUeNAwTFsAKpn17Voq259oCczJdQIhcqhFZiWaih8YLg8Boo5RAiuinQ5G3eanObEyIgppD9HujUEU86vY1SHQPa5KTrSSFqC2YFxUoAM/JQWGG+mQNbQIw52amwNZTQOKt/Uv4f70fJMyWoMNC0tvtCAeeGnEGt6GXCL7xUn8iQgozUS2CDloerw0KIrhNK4ZNBwL3MI5nsTKCwEN9DBYjPkmDe5wbH+7wrqLOhb58S1s9YPuhVt+jnh0LEyCJ68flPeA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) smtp.rcpttodomain=dpdk.org 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 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=tTn6IeXXd5vg4lSeYQeYXEQ4K+ZJv4Fi4+3Zq+x8K20=; b=V6sDkU9rBhYPcUo85UuUW2kzB1p9MpXKODC6EpPDw9AZtWbGjiLtKeAxEc3eyaW33xIZ1WZWayZCNzr0YX0/oarn9VQX70s0i6THFfg1CdpkGAiUIZNBKIL/uGTT+UEydE04w3ZpnPxKrzxshAs6DUMqiSEgaQJS5XCt88fY9wK8rzoyO07ckbLm0b7gomRCXKql1YoG7Vtghjp0ViGqaJT6zrrSuU22XkonIgPWI4XjUG0sKE9kPl49Om3nVA81sSHc/0QHidPKDKHOt9ux47AmtvQBrX3KUqxreC2tceJFnaPsycoYr1bw7o8+ou1WOovjKTV/FXKw70Y6U1HCBA== Received: from BN9P222CA0025.NAMP222.PROD.OUTLOOK.COM (2603:10b6:408:10c::30) by BN6PR1201MB0194.namprd12.prod.outlook.com (2603:10b6:405:59::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.12; Thu, 2 Jun 2022 11:39:24 +0000 Received: from BN8NAM11FT037.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10c:cafe::bb) by BN9P222CA0025.outlook.office365.com (2603:10b6:408:10c::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13 via Frontend Transport; Thu, 2 Jun 2022 11:39:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) 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 12.22.5.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.238) by BN8NAM11FT037.mail.protection.outlook.com (10.13.177.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5314.12 via Frontend Transport; Thu, 2 Jun 2022 11:39:23 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Thu, 2 Jun 2022 11:39:22 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 2 Jun 2022 04:39:21 -0700 Received: from nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22 via Frontend Transport; Thu, 2 Jun 2022 04:39:20 -0700 From: Michael Baum To: CC: Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko , , Subject: [PATCH] net/mlx5: fix entry size in HWS construct data ipool Date: Thu, 2 Jun 2022 14:39:16 +0300 Message-ID: <20220602113916.1680094-1-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8a7dd3ea-03f5-4daf-8af3-08da448c8a82 X-MS-TrafficTypeDiagnostic: BN6PR1201MB0194:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +gVpQGTaus3KBhiWlO4nr3U0tnXJc3peozXluJLzRdOVeaTkFkowm/LRwRiSt3mV4Y1ncJLQw3mTpDqJsmFaEnstPBuNh8HxiiaNfVuTMr7nNoShIQZGf9gBiXaTjbtYYhY+3t9Qc5IB4Ttu2nwIMu9R9i1EACtwKFUvtx2qbcirsYD9pfuZO89dXpmzsuxhGlV1I+pDLJKKp7N9IB/AHXxkyJ+mH6oe5vxcaGGMQGmegVMcLS1uybr+feMEhUvY2S4YWMSx7+huKhUykVrTmu1uZvh/oN13cr9EZhpxEOBeqgOqDVCm2jZpgp4ANDQhWAXasVJhgdFLkA1f1gP30jrO7FPUva4mLDwZ/ED9SiK3prozpDjqKjaVQHhM3OYqp5PfMGS9wd0hKN3gwmSVSmPQjvnvskhOV0jp7vexe9KhVgeo9sdIFzcLQf+rHUJ99RBnEQzZTez3DtSk4UhFOLpFscoVI2jlFT3cz1vPtzJBV9VRI8IQaLbeUV1bH19nGv8X9812JFxFVkX9cJdzBMZa/RcavLrC9G1cZfPToAK7Q1M9fBzzaLa7CibH+V7b64PGD4JbJRmZ4LTj1pLTUGMoJKhERYN98qPcykOfjqrsYC9FOjH3iPC15KUUZr/KWFI6dBAtFjReuPeAMiTe7Kmeta05ZnI0ob9bwmLXO1BKTNdiDB3Yo/D5rRe4n3mmX7LZ57mLHwUT6cL4NmdaAgOWo1WqDu+qg70OxCxccVS7x10cjlIQtvE6BOj4YuKO X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(46966006)(40470700004)(5660300002)(2906002)(82310400005)(54906003)(36860700001)(6916009)(2616005)(6666004)(508600001)(1076003)(86362001)(55016003)(83380400001)(336012)(426003)(40460700003)(6286002)(47076005)(7696005)(186003)(26005)(8936002)(36756003)(316002)(356005)(4326008)(70586007)(81166007)(70206006)(450100002)(8676002)(36900700001)(309714004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2022 11:39:23.4549 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8a7dd3ea-03f5-4daf-8af3-08da448c8a82 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT037.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1201MB0194 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 The mlx5_action_construct_data structure memory is managed by ipool named acts_ipool. The size of one entry in this ipool is mistakenly defined as size of rte_flow_hw structure. This size is used to reset in the allocated part. When the size is incorrect it resets memory that does not belong to it. This patch defines the correct size. Fixes: f13fab23922b ("net/mlx5: add flow jump action") Cc: suanmingm@nvidia.com Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 2c2bd0feef..12498794a5 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -2044,7 +2044,7 @@ flow_hw_configure(struct rte_eth_dev *dev, struct mlx5_hw_q_job *job = NULL; uint32_t mem_size, i, j; struct mlx5_indexed_pool_config cfg = { - .size = sizeof(struct rte_flow_hw), + .size = sizeof(struct mlx5_action_construct_data), .trunk_size = 4096, .need_lock = 1, .release_mem_en = !!priv->sh->config.reclaim_mode, -- 2.25.1