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 74734432E1; Thu, 9 Nov 2023 09:12:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6445142DEF; Thu, 9 Nov 2023 09:12:42 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2072.outbound.protection.outlook.com [40.107.94.72]) by mails.dpdk.org (Postfix) with ESMTP id 590E340267 for ; Thu, 9 Nov 2023 09:12:40 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GIOfMui281kfrngyiB293DAGburApbkepeyvaf8VPumInYcboKuyzUHJ8WUR6uAkJSBg/Rokpr9nWAtZSCEPCFHKfWvZXFyl0HscP1LfKPXIomTKC8yIuWHjTCWk/9oKq5D4I9xgyOhk1vrEt7RUmnbzB9N+7Sl6xLr2SzAdegRtpBmvWM3NNdk1aEC1WvesxIjsvYnRc9z+3D29qd936izOmNRj9WD9ThmEqaGxA1BdDZl4FAvMDn417IAQzNEOXAotSkgnJd0P61nkkOrqI5cLMEM/UDR3hetCFYzmxPGYSsWkBML3db/rAyaFrllYsFhf9kCKpZG5y5S4oCVuVA== 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=nGfjon4dSXbYjU5XVrSxsHscKelKwQ++Tcpuxvwslgk=; b=dH5quS8KFkBfcmsRZRVpvQhdzKWOCC6UTsC8AngqRHU0qHsaMrY5OSR/W1JOYGi7HUPuZ+orCDdpaZlv+7ZTKNAuEYMB9HGnblGrMnUeqtgYvsJt+KCYC+t2LgEoBsn0XL17fwIZ4nQGFf5RxAHaeh8Xxy5XPZK13wFEc5DC5Jj/0SsZD+zGf3a8Wnx/2GotGgasUDgX8bbcyYnENTxhAtH4P56PXUHmjAmHEVDQpqv1/0Zk6sE4QmwHprSyDQNcSkxaCmgRultiVmr2dxW4o7e+6wzNzdVOB5ZG2JjrOzBdwkr9gIpewVooen/jzW/OK3RHFeoNsEEAh9I/w7xEHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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 (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=nGfjon4dSXbYjU5XVrSxsHscKelKwQ++Tcpuxvwslgk=; b=tRvIobaIH33AO3wZa1+PrcxbcHMNjjLuAtJ9aROIpQNE3tWjiMQENl6vGc+vjO5Dt9DCsexhI8eiYzHXACejJQCDDFC/f19F382duPrV5h1rJc60snzsNjBEdgYjfXEaJlCCl5g/3CWnzDcxmQXmSSQ06wIIB5QbhF+7XDDXj8OT8VLufDGCra3KE+BQ7VPv4NsON79FzB+sl4cQS//Qvx0tVU/W81E2zz22dEo5+clGWRQdAqV9kRCKgMyJdT9yulnCdColxMZ9WbB9kDgZfHFFrM5GQRqMyN+E4pVVtdkN8QqIzdRf38dM41+p5REshr+U8mk3gOXFYzhgQAyuMQ== Received: from CY5PR13CA0085.namprd13.prod.outlook.com (2603:10b6:930:a::11) by PH0PR12MB5483.namprd12.prod.outlook.com (2603:10b6:510:ee::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Thu, 9 Nov 2023 08:12:38 +0000 Received: from CY4PEPF0000EE3A.namprd03.prod.outlook.com (2603:10b6:930:a:cafe::a4) by CY5PR13CA0085.outlook.office365.com (2603:10b6:930:a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.18 via Frontend Transport; Thu, 9 Nov 2023 08:12:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000EE3A.mail.protection.outlook.com (10.167.242.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.16 via Frontend Transport; Thu, 9 Nov 2023 08:12:37 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 9 Nov 2023 00:12:24 -0800 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 9 Nov 2023 00:12:21 -0800 From: Suanming Mou To: Matan Azrad , Viacheslav Ovsiienko , Ori Kam CC: , , Dariusz Sosnowski Subject: [PATCH] net/mlx5: fix job flow memory calculation Date: Thu, 9 Nov 2023 16:12:04 +0800 Message-ID: <20231109081204.1312043-1-suanmingm@nvidia.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE3A:EE_|PH0PR12MB5483:EE_ X-MS-Office365-Filtering-Correlation-Id: 28e51b55-68e0-455c-d75b-08dbe0fba2f7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JLwEcVZa7d4QPKtMuVc26r4HON4CjVbSKq7ycQpDrYITEtYEWMLyvXsaRYwyHDaeUP/ua5a8764I70aEXhV/BNzi1KOFst3LsbOv7UWX5K5aT3/D5A5w50z0uBFIoE0GExiNTu/ABqxoX//5UyLKV+aacS+FxKgL13vcWWUYrKFPG74oD8ax2MrtBpLq88MoOLUPcA0bygP1oVjc9j78IJQeEp1pdJBfS8IwhvUn++DDp0bPzFu96SB4CzwuNGmh79HGLyg1t90sTnHUBKVmpk5jekEBrvaYS4eabgl/5eEROzoEJZFYoTMyLp4r2mecFpghilZ5cLt0E3GAqmmspHvHZZ/ZfXeXjj8E/PAKVVd+cyBvcjPlPA/VdRcJG0VWCjUn8HAVr3hgxOYWGmdyDTksdOsKvrZv21YQkv5y0QHNulKbqmvO4yYWwEDr4ONWJB8xjjdOxzWGxdyTlcSWgWUA/MCDXaxxnMjvLjLL/Iid0m9kaB0KXyr76yjxgX/XLHL3yk792jzfJTjTdt6wUIXzR3jAecbp3SjRQ6RZ8+ZEslvu3h5jBu6A2zVI11PV+2B3qsS+9QJbvMbeMvbdj/XCoUmKowqMosK3ue6y87+GXHbz9WoQI9uQlz+EBdX6PipV5vunKsTaiXDRcOahDo4umQtJSohOATYt06adidAWv0bv7oAmG8iCsQ4agxWYSWnZUlBEOcYRwAhRi/thVk7aNkzvoBzhKKKKkQZR9CLRruYd2Rztsfkof6WHGx9E X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(396003)(376002)(346002)(136003)(230922051799003)(451199024)(82310400011)(64100799003)(186009)(1800799009)(36840700001)(46966006)(40470700004)(41300700001)(2906002)(6286002)(2616005)(6666004)(7696005)(478600001)(5660300002)(83380400001)(107886003)(16526019)(1076003)(26005)(70586007)(426003)(336012)(54906003)(6636002)(4326008)(8936002)(8676002)(316002)(110136005)(47076005)(70206006)(82740400003)(36756003)(36860700001)(7636003)(86362001)(356005)(4744005)(40460700003)(40480700001)(55016003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2023 08:12:37.7528 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 28e51b55-68e0-455c-d75b-08dbe0fba2f7 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EE3A.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5483 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 upd_flow is the final object in the memory layout. This commit adjusts the new job memory start from upd_flow. Fixes: 63296851fadb ("net/mlx5: support flow rule update") Signed-off-by: Suanming Mou Acked-by: Dariusz Sosnowski --- drivers/net/mlx5/mlx5_flow_hw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index deb0be05fb..d512889682 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -9088,8 +9088,7 @@ flow_hw_configure(struct rte_eth_dev *dev, &priv->hw_q[nb_q_updated]; else priv->hw_q[i].job = (struct mlx5_hw_q_job **) - &job[_queue_attr[i - 1]->size - 1].items - [MLX5_HW_MAX_ITEMS]; + &job[_queue_attr[i - 1]->size - 1].upd_flow[1]; job = (struct mlx5_hw_q_job *) &priv->hw_q[i].job[_queue_attr[i]->size]; mhdr_cmd = (struct mlx5_modification_cmd *) -- 2.34.1