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 965D043C38; Thu, 29 Feb 2024 12:32:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF78E40395; Thu, 29 Feb 2024 12:32:01 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2046.outbound.protection.outlook.com [40.107.92.46]) by mails.dpdk.org (Postfix) with ESMTP id E2AB8402B4; Thu, 29 Feb 2024 12:31:59 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aOFAxvyu1lDIsNJVoLUV8YasrE75z+xzatgo8967keHoi6y8dT1bsGxJYqwOSCxJvDV7ldOZdmlA294fhUpMz1+h439UIJp9cXU+G2zB3rrGLt1AWlFij5hir1h0rjgwOisQUKwvvDvlcJ6PnwTc85ow1zlq8i5KPRq3xsN/vTjck4l1Vy0ijuiNxv6/RsTz55bj5pYsoYoT/nQv/sCtsZj5Yef3HxzqlJjgd5YePXYFddUhg0bQvA6EMRzgHh5+cKZOryathgHii2A/zWPE+ubkCUly2VSAcw5psuYq6S/7Y9Hx5wwDzvCo5qeFUvCOC/GdmqDRQOYEnm45VAX/3g== 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=1cVdFDpZR/GoILOjU0HkUoTIGb56aXwmXwv/mzJqjqA=; b=FyBDmyCLtbZk0fqaatTmNcp0FKsF/H5JSWEZhl7goaTZuWpbm+GuNx+4A/AmaRq3C2iV8oFTiDGonmjQZZBWSh66wrCUxoBZzj2h883G6t9O/EYKcVDOme/+rsQ5b5So6VNDHUVQ0V+99npJs6nUtakdaBAIHeftU2VSKd3oCSBZBVDI7oGhrWsmhr15ct1ELVBCesJQcFyYaa8cqsNbiehwGU2CDdj11A6UuzvQXkuPcXb32la/XJlKppqb3uhdJ3/RmdOu+E9/IFWh0pAvvhTAdu9enimupNnk4ZHQYgZr7l5qkBt2PFJpHEJNPDl6huKliQM932Hmc2tGzhC7Tw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=1cVdFDpZR/GoILOjU0HkUoTIGb56aXwmXwv/mzJqjqA=; b=nHROJdCKUupHAg8ZHDWDyQ4WneUdmEma03j14rLuX5xKhvQ7+bYmkBMdJeIOi2uNn3XKYJMj0EZ82/4Siny7qA3rgKHElES341cc5Sr82WxTK/fuiy6u/llSOtQ0ub1pWvwe1g1jDjuHJBcn5Fw/ONMz8+63pXk8aYnFoP6nM4bpYE1g+Y5K3w73JSXRyvMFSvh7hoiPDfL0UY+ySmfhuYN511hmvGQQM2t005P9MqNZXxsKCB0KN0NrueatGoHK7W64rlig2iEe0j9F5oStZJdtiwHtGdR4enJuXu3BjwaL3UoB6CKURV+BhkhUv0YTSqkgajMwt9sJ9sHjJgakPg== Received: from MW4PR04CA0316.namprd04.prod.outlook.com (2603:10b6:303:82::21) by DS0PR12MB7780.namprd12.prod.outlook.com (2603:10b6:8:152::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.41; Thu, 29 Feb 2024 11:31:57 +0000 Received: from CO1PEPF000044F4.namprd05.prod.outlook.com (2603:10b6:303:82:cafe::e7) by MW4PR04CA0316.outlook.office365.com (2603:10b6:303:82::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.28 via Frontend Transport; Thu, 29 Feb 2024 11:31:57 +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 CO1PEPF000044F4.mail.protection.outlook.com (10.167.241.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25 via Frontend Transport; Thu, 29 Feb 2024 11:31:57 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) 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.986.41; Thu, 29 Feb 2024 03:31:43 -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.1258.12; Thu, 29 Feb 2024 03:31:39 -0800 From: Gregory Etelson To: CC: , , , , Dariusz Sosnowski , "Viacheslav Ovsiienko" , Ori Kam , Suanming Mou , Matan Azrad Subject: [PATCH] net/mlx5: fix non-masked indirect list meter translation in flow rule Date: Thu, 29 Feb 2024 13:31:19 +0200 Message-ID: <20240229113119.598405-1-getelson@nvidia.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044F4:EE_|DS0PR12MB7780:EE_ X-MS-Office365-Filtering-Correlation-Id: 362f7bd1-32a4-43ec-2194-08dc391a09bf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5duHck9PAv+T4v45TZ+gm20YUdNyTKkHn8rNHGpFSn5xhY5nFcy1PKJ5pBSoM6Hm+uqfPFappPrwIs3KKOnmXDkEDIjdxsRY4ylidpT+002lIoH2U/hxU2KepS1uSN5s5+wzPqKPsiID4M08PPbcBsxNoaZwCxENYGc8bElV1eOc1q4Hvyb5ZgFA5FdFtUW5DZi+vQjLg+EuRD4IATsx0ibphr0CYMALKs/PzEasP4FN9GlU5Xm8kIQNC/8xbDE6+z7weBzM2TnGb9ii6XA1jczXag8J+DX84Nx7FV2JDzYa297II+jXRh//0MMKK2UH/pO/twrCLusYRbno0s74+oCiLiQ9IrJOBRx42h60w0Np5esf+0m4M2O4Ov512WBcpgt5cQh6O9RiiLXdgNh3KHjK+C8Y3Vq81CDU3ZiKQ/2mECM93wCP/SxumNRx3jPJMATYQJfq1fUN/ieuql4FnD/6xQe17XXW/5sUZpoph57UqyAjK2XViSc/D7fa1T6mLN8el3MGe63oouU2aF4vq+39032JfHIsItk7aSRiYvv1zN9kkPRGKYAIZhMqk5l3QbrQHlwzhTAPWEhMPIkVwHnRBBcGTVvfI/Ju/xKxzA/bVWPVkpqkDkAIRa17bIjqi+cJjCFAqwoyCHLDqe/IJ1xqCJZh3lOEtkFB+CPJtImF1k42Ggjx19CEnvkdpvmk4JiEsKStcSvD/D86F0Hagd244GkcGHiUXjbNlPSVz/bIPAEDRw6cOA6zZtk/D+pG 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:(13230031)(82310400014)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Feb 2024 11:31:57.3190 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 362f7bd1-32a4-43ec-2194-08dc391a09bf 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: CO1PEPF000044F4.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7780 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 Template table reuses DR5 action handle for non-masked indirect actions. Flow rule must explicitly translate non-masked indirect action and update DR5 handle with the rule indirect object. Current PMD assumed DR5 handle of non-masked indirect action was always NULL before the action translation. The patch always translates non-masked indirect list meter object. Fixes: e26f50adbf38 ("net/mlx5: support indirect list meter mark action") Cc: stable@dpdk.org Signed-off-by: Gregory Etelson Acked-by: Dariusz Sosnowski Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow_hw.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 9620b7f576..9833654aac 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -1702,15 +1702,9 @@ flow_hw_translate_indirect_meter(struct rte_eth_dev *dev, const struct rte_flow_indirect_update_flow_meter_mark **flow_conf = (typeof(flow_conf))action_conf->conf; - /* - * Masked indirect handle set dr5 action during template table - * translation. - */ - if (!dr_rule->action) { - ret = flow_dr_set_meter(priv, dr_rule, action_conf); - if (ret) - return ret; - } + ret = flow_dr_set_meter(priv, dr_rule, action_conf); + if (ret) + return ret; if (!act_data->shared_meter.conf_masked) { if (flow_conf && flow_conf[0] && flow_conf[0]->init_color < RTE_COLORS) flow_dr_mtr_flow_color(dr_rule, flow_conf[0]->init_color); -- 2.39.2